class Cucumber::WireSupport::WireLanguage
The wire-protocol (lanugage independent) implementation of the programming language API.
Public Class Methods
new(runtime)
click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 17 def initialize(runtime) @connections = [] end
Public Instance Methods
alias_adverbs(adverbs)
click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 21 def alias_adverbs(adverbs) end
load_code_file(wire_file)
click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 24 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_class, snippet_type)
click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 29 def snippet_text(code_keyword, step_name, multiline_arg_class, snippet_type) snippets = @connections.map do |remote| remote.snippet_text(code_keyword, step_name, multiline_arg_class.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 36 def step_matches(step_name, formatted_step_name) @connections.map{ |c| c.step_matches(step_name, formatted_step_name)}.flatten end
Protected Instance Methods
begin_scenario(scenario)
click to toggle source
# File lib/cucumber/wire_support/wire_language.rb, line 42 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 47 def end_scenario scenario = @current_scenario @connections.each { |c| c.end_scenario(scenario) } @current_scenario = nil end