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

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

Instance Method Summary collapse

Methods included from Indentation

indentation_level

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