Class: Cucumber::Core::Gherkin::Writer::DocString
- Inherits:
-
Object
- Object
- Cucumber::Core::Gherkin::Writer::DocString
- Extended by:
- Indentation
- 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.
Methods included from Indentation
Constructor Details
#initialize(string, content_type) ⇒ DocString
Returns a new instance of DocString.
17 18 19 20 |
# File 'lib/cucumber/core/gherkin/writer/doc_string.rb', line 17 def initialize(string, content_type) @strings = string.split("\n").map(&:strip) @content_type = content_type end |
Instance Method Details
#build(source) ⇒ Object
22 23 24 |
# File 'lib/cucumber/core/gherkin/writer/doc_string.rb', line 22 def build(source) source + statements end |