Parent

Methods

Class/Module Index [+]

Quicksearch

Cucumber::JsSupport::JsTransform

Public Class Methods

new(js_language, regexp, js_function) click to toggle source
# File lib/cucumber/js_support/js_language.rb, line 75
def initialize(js_language, regexp, js_function)
  @js_language, @regexp, @js_function = js_language, regexp.ToString, js_function
end

Public Instance Methods

invoke(arg) click to toggle source
# File lib/cucumber/js_support/js_language.rb, line 85
def invoke(arg)
  @js_language.current_world.execute(@js_function, [arg])
end
match(arg) click to toggle source
# File lib/cucumber/js_support/js_language.rb, line 79
def match(arg)
  arg = JsSupport.argument_safe_string(arg)
  matches = eval_js "#{@regexp}.exec(#{arg});"
  matches ? matches[1..-1] : nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.