Class: Rung::Runner::Runner

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rung/runner/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(operation_instance, initial_state) ⇒ Runner

Returns a new instance of Runner.

Parameters:


6
7
8
# File 'lib/rung/runner/runner.rb', line 6

def initialize(operation_instance, initial_state)
  @context = RunContext.new(operation_instance, {}.merge(initial_state))
end

Instance Method Details

#callRung::State

Returns:


17
18
19
20
21
# File 'lib/rung/runner/runner.rb', line 17

def call
  with_callbacks(around_callbacks) { iterate(steps_definition) }

  current_state
end