class Cucumber::JsSupport::JsStepDefinition

def arguments_from(step_name)

def arguments_from(step_name)
  matches = eval_js "#{@regexp}.exec('#{step_name}')"
  if matches
    matches.to_a[1..-1].map do |match|
      JsArg.new(match)
    end
  end
end

def file_colon_line

def file_colon_line
  # Not possible yet to get file/line of js function with V8/therubyracer
  ""
end

def initialize(js_language, regexp, js_function)

def initialize(js_language, regexp, js_function)
  @js_language, @regexp, @js_function = js_language, regexp.to_s, js_function
end

def invoke(args)

def invoke(args)
  args = @js_language.execute_transforms(args)
  @js_language.current_world.execute(@js_function, args)
end

def regexp_source

def regexp_source
  @regexp.inspect
end