Class: Cucumber::Core::Gherkin::Writer::DocString

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/core/gherkin/writer.rb

Instance Method Summary collapse

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