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.
172 173 174 175 |
# File 'lib/cucumber/core/gherkin/writer.rb', line 172 def initialize(string, content_type) @strings = string.split("\n").map(&:strip) @content_type = content_type end |
Instance Method Details
#build(source) ⇒ Object
177 178 179 |
# File 'lib/cucumber/core/gherkin/writer.rb', line 177 def build(source) source + statements end |