Class: Cucumber::RbSupport::RbHook

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/rb_support/rb_hook.rb

Overview

Wrapper for Before, After and AfterStep hooks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rb_language, tag_names, proc) ⇒ RbHook

Returns a new instance of RbHook.



7
8
9
10
11
# File 'lib/cucumber/rb_support/rb_hook.rb', line 7

def initialize(rb_language, tag_names, proc)
  @rb_language = rb_language
  @tag_names = tag_names
  @proc = proc
end

Instance Attribute Details

#tag_namesObject (readonly)

Returns the value of attribute tag_names.



5
6
7
# File 'lib/cucumber/rb_support/rb_hook.rb', line 5

def tag_names
  @tag_names
end

Instance Method Details

#invoke(location, argument) ⇒ Object



13
14
15
# File 'lib/cucumber/rb_support/rb_hook.rb', line 13

def invoke(location, argument)
  @rb_language.current_world.cucumber_instance_exec(false, location, argument, &@proc)
end