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.



173
174
175
176
# File 'lib/cucumber/core/gherkin/writer.rb', line 173

def initialize(string, content_type)
  @strings = string.split("\n").map(&:strip)
  @content_type = content_type
end

Instance Method Details

#build(source) ⇒ Object



178
179
180
# File 'lib/cucumber/core/gherkin/writer.rb', line 178

def build(source)
  source + statements
end