class Cucumber::WireSupport::WireProtocol::Requests::StepMatches

Public Instance Methods

execute(name_to_match, name_to_report) click to toggle source
# File lib/cucumber/wire_support/wire_protocol/requests.rb, line 9
def execute(name_to_match, name_to_report)
  @name_to_match, @name_to_report = name_to_match, name_to_report
  request_params = {
    :name_to_match => name_to_match
  }
  super(request_params)
end
handle_step_matches(params)
Alias for: handle_success
handle_success(params) click to toggle source
# File lib/cucumber/wire_support/wire_protocol/requests.rb, line 17
def handle_success(params)
  params.map do |raw_step_match|
    create_step_match(raw_step_match)
  end
end
Also aliased as: handle_step_matches

Private Instance Methods

create_step_match(raw_step_match) click to toggle source
# File lib/cucumber/wire_support/wire_protocol/requests.rb, line 27
def create_step_match(raw_step_match)
  step_definition = WireStepDefinition.new(@connection, raw_step_match)
  step_args = raw_step_match['args'].map do |raw_arg|
    Gherkin::Formatter::Argument.new(raw_arg['pos'], raw_arg['val'])
  end
  step_match(step_definition, step_args)
end
step_match(step_definition, step_args) click to toggle source
# File lib/cucumber/wire_support/wire_protocol/requests.rb, line 35
def step_match(step_definition, step_args)
  StepMatch.new(step_definition, @name_to_match, @name_to_report, step_args)
end