Class: Cucumber::Wire::Snippet::Generator
- Inherits:
-
Object
- Object
- Cucumber::Wire::Snippet::Generator
- Defined in:
- lib/cucumber/wire/snippet.rb
Defined Under Namespace
Classes: MultilineArgClassName
Instance Method Summary collapse
- #call(code_keyword, step_name, multiline_arg, snippet_type) ⇒ Object
-
#initialize(connections) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(connections) ⇒ Generator
Returns a new instance of Generator.
5 6 7 8 |
# File 'lib/cucumber/wire/snippet.rb', line 5 def initialize(connections) # This array is shared mutable state with the wire language. @connections = connections end |
Instance Method Details
#call(code_keyword, step_name, multiline_arg, snippet_type) ⇒ Object
10 11 12 |
# File 'lib/cucumber/wire/snippet.rb', line 10 def call(code_keyword, step_name, multiline_arg, snippet_type) @connections.snippets(code_keyword, step_name, MultilineArgClassName.new(multiline_arg).to_s).join("\n") end |