Class: Gherkin::Formatter::Model::TagStatement
- Inherits:
-
DescribedStatement
- Object
- Hashable
- BasicStatement
- DescribedStatement
- Gherkin::Formatter::Model::TagStatement
- Defined in:
- lib/gherkin/formatter/model.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Attributes inherited from DescribedStatement
Attributes inherited from BasicStatement
#comments, #keyword, #line, #name
Instance Method Summary collapse
- #first_non_comment_line ⇒ Object
-
#initialize(comments, tags, keyword, name, description, line, id) ⇒ TagStatement
constructor
A new instance of TagStatement.
Methods inherited from BasicStatement
Methods inherited from Hashable
Constructor Details
#initialize(comments, tags, keyword, name, description, line, id) ⇒ TagStatement
Returns a new instance of TagStatement.
36 37 38 39 40 |
# File 'lib/gherkin/formatter/model.rb', line 36 def initialize(comments, , keyword, name, description, line, id) super(comments, keyword, name, description, line) @tags = @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
34 35 36 |
# File 'lib/gherkin/formatter/model.rb', line 34 def id @id end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
34 35 36 |
# File 'lib/gherkin/formatter/model.rb', line 34 def @tags end |
Instance Method Details
#first_non_comment_line ⇒ Object
42 43 44 |
# File 'lib/gherkin/formatter/model.rb', line 42 def first_non_comment_line @tags.any? ? @tags[0].line : @line end |