Parent

Methods

Class 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 72
72:       def initialize(js_language, regexp, js_function)
73:         @js_language, @regexp, @js_function = js_language, regexp.to_s, js_function
74:       end

Public Instance Methods

invoke(arg) click to toggle source
    # File lib/cucumber/js_support/js_language.rb, line 82
82:       def invoke(arg)
83:         @js_function.call([arg])
84:       end
match(arg) click to toggle source
    # File lib/cucumber/js_support/js_language.rb, line 76
76:       def match(arg)
77:         arg = JsSupport.argument_safe_string(arg)
78:         matches = (eval_js "#{@regexp}.exec('#{arg}');").to_a
79:         matches.empty? ? nil : matches[1..1]
80:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.