Class: Gherkin::Formatter::Model::TagStatement

Inherits:
DescribedStatement show all
Defined in:
lib/gherkin/formatter/model.rb

Direct Known Subclasses

Examples, Feature, Scenario, ScenarioOutline

Instance Attribute Summary collapse

Attributes inherited from DescribedStatement

#description

Attributes inherited from BasicStatement

#comments, #keyword, #line, #name

Instance Method Summary collapse

Methods inherited from BasicStatement

#line_range

Methods inherited from Hashable

#to_hash

Constructor Details

#initialize(comments, tags, keyword, name, description, line) ⇒ TagStatement

Returns a new instance of TagStatement.



51
52
53
54
# File 'lib/gherkin/formatter/model.rb', line 51

def initialize(comments, tags, keyword, name, description, line)
  super(comments, keyword, name, description, line)
  @tags = tags
end

Instance Attribute Details

#tagsObject (readonly)

Returns the value of attribute tags.



49
50
51
# File 'lib/gherkin/formatter/model.rb', line 49

def tags
  @tags
end

Instance Method Details

#first_non_comment_lineObject



56
57
58
# File 'lib/gherkin/formatter/model.rb', line 56

def first_non_comment_line
  @tags.any? ? @tags[0].line : @line
end