Class: Cucumber::Core::Gherkin::Writer::DocString
- Inherits:
-
Object
- Object
- Cucumber::Core::Gherkin::Writer::DocString
- Defined in:
- lib/cucumber/core/gherkin/writer.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.
216 217 218 219 |
# File 'lib/cucumber/core/gherkin/writer.rb', line 216 def initialize(string, content_type) @strings = string.split("\n").map(&:strip) @content_type = content_type end |
Instance Method Details
#build(source) ⇒ Object
221 222 223 |
# File 'lib/cucumber/core/gherkin/writer.rb', line 221 def build(source) source + statements end |