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, id) ⇒ TagStatement


36
37
38
39
40
# File 'lib/gherkin/formatter/model.rb', line 36

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id


34
35
36
# File 'lib/gherkin/formatter/model.rb', line 34

def id
  @id
end

#tagsObject (readonly)

Returns the value of attribute tags


34
35
36
# File 'lib/gherkin/formatter/model.rb', line 34

def tags
  @tags
end

Instance Method Details

#first_non_comment_lineObject


42
43
44
# File 'lib/gherkin/formatter/model.rb', line 42

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