Class: Cucumber::JsSupport::JsHook

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/js_support/js_language.rb

Instance Method Summary collapse

Constructor Details

#initialize(js_language, tag_expressions, js_function) ⇒ JsHook

Returns a new instance of JsHook.



62
63
64
# File 'lib/cucumber/js_support/js_language.rb', line 62

def initialize(js_language, tag_expressions, js_function)
  @js_language, @tag_expressions, @js_function = js_language, tag_expressions, js_function
end

Instance Method Details

#invoke(location, scenario) ⇒ Object



70
71
72
# File 'lib/cucumber/js_support/js_language.rb', line 70

def invoke(location, scenario)
  @js_language.current_world.execute(@js_function)
end

#tag_expressionsObject



66
67
68
# File 'lib/cucumber/js_support/js_language.rb', line 66

def tag_expressions
  @tag_expressions
end