Class: Cucumber::Core::Gherkin::Writer::DocString
- Inherits:
-
Object
- Object
- Cucumber::Core::Gherkin::Writer::DocString
- Defined in:
- lib/cucumber/core/gherkin/writer/doc_string.rb
Instance Method Summary collapse
- #build(source) ⇒ Object
-
#initialize(string, content_type) ⇒ DocString
constructor
A new instance of DocString.
Constructor Details
#initialize(string, content_type) ⇒ DocString
Returns a new instance of DocString.
15 16 17 18 |
# File 'lib/cucumber/core/gherkin/writer/doc_string.rb', line 15 def initialize(string, content_type) @strings = string.split("\n").map(&:strip) @content_type = content_type end |
Instance Method Details
#build(source) ⇒ Object
20 21 22 |
# File 'lib/cucumber/core/gherkin/writer/doc_string.rb', line 20 def build(source) source + statements end |