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

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/writer.rb

Instance Method Summary collapse

Constructor Details

#initialize(string, content_type) ⇒ DocString

Returns a new instance of DocString.



209
210
211
212
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/writer.rb', line 209

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

Instance Method Details

#build(source) ⇒ Object



214
215
216
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/writer.rb', line 214

def build(source)
  source + statements
end