Module: Cucumber::Core::Gherkin::Writer::AcceptsComments
- Included in:
- HasElements
- Defined in:
- lib/cucumber/core/gherkin/writer/accepts_comments.rb
Instance Method Summary collapse
Instance Method Details
#comment(line) ⇒ Object
8 9 10 |
# File 'lib/cucumber/core/gherkin/writer/accepts_comments.rb', line 8 def comment(line) comment_lines << "# #{line}" end |
#comment_lines ⇒ Object
12 13 14 |
# File 'lib/cucumber/core/gherkin/writer/accepts_comments.rb', line 12 def comment_lines @comment_lines ||= [] end |
#slurp_comments ⇒ Object
16 17 18 |
# File 'lib/cucumber/core/gherkin/writer/accepts_comments.rb', line 16 def slurp_comments comment_lines.tap { @comment_lines = nil } end |