Parent

Class/Module Index [+]

Quicksearch

Cucumber::JsSupport::JsStepDefinition

Public Class Methods

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

Public Instance Methods

arguments_from(step_name) click to toggle source
# File lib/cucumber/js_support/js_language.rb, line 45
def arguments_from(step_name)
  matches = eval_js "#{@regexp}.exec('#{step_name}')"
  if matches
    matches[1..-1].map do |match|
      JsArg.new(match)
    end
  end
end
file_colon_line() click to toggle source
# File lib/cucumber/js_support/js_language.rb, line 54
def file_colon_line
  # Not possible yet to get file/line of js function with V8/therubyracer
  ""
end
invoke(args) click to toggle source
# File lib/cucumber/js_support/js_language.rb, line 40
def invoke(args)
  args = @js_language.execute_transforms(args)
  @js_language.current_world.execute(@js_function, args)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.