Object
# File lib/cucumber/js_support/js_language.rb, line 76 def initialize(js_language, regexp, js_function) @js_language, @regexp, @js_function = js_language, regexp.to_s, js_function end
# File lib/cucumber/js_support/js_language.rb, line 86 def invoke(arg) @js_function.call([arg]) end
# File lib/cucumber/js_support/js_language.rb, line 80 def match(arg) arg = JsSupport.argument_safe_string(arg) matches = (eval_js "#{@regexp}.exec('#{arg}');").to_a matches.empty? ? nil : matches[1..-1] end
[Validate]
Generated with the Darkfish Rdoc Generator 2.