Class: Cucumber::Runtime::StepHooks

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/runtime/step_hooks.rb

Instance Method Summary collapse

Constructor Details

#initialize(hooks) ⇒ StepHooks

Returns a new instance of StepHooks



6
7
8
# File 'lib/cucumber/runtime/step_hooks.rb', line 6

def initialize(hooks)
  @hooks = hooks
end

Instance Method Details

#apply(test_steps) ⇒ Object



10
11
12
13
14
# File 'lib/cucumber/runtime/step_hooks.rb', line 10

def apply(test_steps)
  test_steps.flat_map do |test_step|
    [test_step] + after_step_hooks(test_step)
  end
end