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.
202 203 204 |
# File 'lib/gherkin/formatter/model.rb', line 202 def initialize(name, line) @name, @line = name, line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
200 201 202 |
# File 'lib/gherkin/formatter/model.rb', line 200 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
200 201 202 |
# File 'lib/gherkin/formatter/model.rb', line 200 def name @name end |
Instance Method Details
#eql?(tag) ⇒ Boolean
206 207 208 |
# File 'lib/gherkin/formatter/model.rb', line 206 def eql?(tag) @name.eql?(tag.name) end |
#hash ⇒ Object
210 211 212 |
# File 'lib/gherkin/formatter/model.rb', line 210 def hash @name.hash end |