class Cucumber::WireSupport::WireLanguage

The wire-protocol (language independent) implementation of the programming language API.

Public Class Methods

new(_=nil) click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 17
def initialize(_=nil)
  @connections = []
end

Public Instance Methods

begin_scenario(scenario) click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 37
def begin_scenario(scenario)
  @connections.each { |c| c.begin_scenario(scenario) }
  @current_scenario = scenario
end
end_scenario() click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 42
def end_scenario
  scenario = @current_scenario
  @connections.each { |c| c.end_scenario(scenario) }
  @current_scenario = nil
end
load_code_file(wire_file) click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 21
def load_code_file(wire_file)
  config = Configuration.from_file(wire_file)
  @connections << Connection.new(config)
end
snippet_text(code_keyword, step_name, multiline_arg, snippet_type) click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 26
def snippet_text(code_keyword, step_name, multiline_arg, snippet_type)
  snippets = @connections.map do |remote|
    remote.snippet_text(code_keyword, step_name, MultilineArgClassName.new(multiline_arg).to_s)
  end
  snippets.flatten.join("\n")
end
step_matches(step_name, formatted_step_name) click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 33
def step_matches(step_name, formatted_step_name)
  @connections.map{ |c| c.step_matches(step_name, formatted_step_name)}.flatten
end