Module: StepMachine::InstanceMethods

Defined in:
lib/step_machine.rb

Instance Method Summary collapse

Instance Method Details

#after_each_step(options = {}, &block) ⇒ Object



33
34
35
# File 'lib/step_machine.rb', line 33

def after_each_step(options = {}, &block)
  @step_machine_runner.after_each_step(options, &block)
end

#before_each_step(options = {}, &block) ⇒ Object



29
30
31
# File 'lib/step_machine.rb', line 29

def before_each_step(options = {}, &block)
  @step_machine_runner.before_each_step(options, &block)
end

#failed_stepObject



49
50
51
# File 'lib/step_machine.rb', line 49

def failed_step
  @step_machine_runner.failed_step
end

#first_step(step) ⇒ Object



41
42
43
# File 'lib/step_machine.rb', line 41

def first_step(step)
  @step_machine_runner.first_step = step
end

#group(name, &block) ⇒ Object



15
16
17
18
# File 'lib/step_machine.rb', line 15

def group(name, &block)
  @step_machine_runner ||= Runner.new
  @step_machine_runner.group(name, &block)
end

#on_step_failure(options = {}, &block) ⇒ Object



25
26
27
# File 'lib/step_machine.rb', line 25

def on_step_failure(options = {}, &block)
  @step_machine_runner.on_step_failure(options, &block)
end

#run_statusObject



45
46
47
# File 'lib/step_machine.rb', line 45

def run_status
  @step_machine_runner.status
end

#run_steps(options = {}) ⇒ Object



37
38
39
# File 'lib/step_machine.rb', line 37

def run_steps(options = {})
  @step_machine_runner.run(options)
end

#step(name, &block) ⇒ Object



20
21
22
23
# File 'lib/step_machine.rb', line 20

def step(name, &block)
  @step_machine_runner ||= Runner.new
  @step_machine_runner.step(name, &block)
end