Module: Cucumber::Core::Gherkin::Writer::AcceptsComments

Included in:
HasElements
Defined in:
lib/cucumber/core/gherkin/writer/helpers.rb

Instance Method Summary collapse

Instance Method Details

#comment(line) ⇒ Object



56
57
58
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 56

def comment(line)
  comment_lines << "# #{line}"
end

#comment_linesObject



60
61
62
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 60

def comment_lines
  @comment_lines ||= []
end

#slurp_commentsObject



64
65
66
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 64

def slurp_comments
  comment_lines.tap { @comment_lines = nil }
end