Class: Gherkin::Formatter::Model::Tag
- Defined in:
- lib/gherkin/formatter/model.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #eql?(tag) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name, line) ⇒ Tag
constructor
A new instance of Tag.
Methods inherited from Hashable
Constructor Details
#initialize(name, line) ⇒ Tag
Returns a new instance of Tag.
169 170 171 |
# File 'lib/gherkin/formatter/model.rb', line 169 def initialize(name, line) @name, @line = name, line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
167 168 169 |
# File 'lib/gherkin/formatter/model.rb', line 167 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
167 168 169 |
# File 'lib/gherkin/formatter/model.rb', line 167 def name @name end |
Instance Method Details
#eql?(tag) ⇒ Boolean
173 174 175 |
# File 'lib/gherkin/formatter/model.rb', line 173 def eql?(tag) @name.eql?(tag.name) end |
#hash ⇒ Object
177 178 179 |
# File 'lib/gherkin/formatter/model.rb', line 177 def hash @name.hash end |