class Cucumber::Wire::Protocol::Requests::StepMatches

Public Instance Methods

execute(name_to_match) click to toggle source
Calls superclass method
# File lib/cucumber/wire/protocol/requests.rb, line 9
def execute(name_to_match)
  @name_to_match = name_to_match
  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/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/protocol/requests.rb, line 27
def create_step_match(raw_step_match)
  step_definition = StepDefinition.new(@connection, raw_step_match, @registry)
  step_args = raw_step_match['args'].map do |raw_arg|
    StepArgument.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/protocol/requests.rb, line 35
def step_match(step_definition, step_args)
  StepMatch.new(step_definition, @name_to_match, step_args)
end