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



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

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

#comment_linesObject



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

def comment_lines
  @comment_lines ||= []
end

#slurp_commentsObject



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

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