Class: Gherkin::Formatter::Model::Tag
- Inherits:
-
Object
- Object
- 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.
Constructor Details
#initialize(name, line) ⇒ Tag
Returns a new instance of Tag.
21 22 23 |
# File 'lib/gherkin/formatter/model.rb', line 21 def initialize(name, line) @name, @line = name, line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
19 20 21 |
# File 'lib/gherkin/formatter/model.rb', line 19 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/gherkin/formatter/model.rb', line 19 def name @name end |
Instance Method Details
#eql?(tag) ⇒ Boolean
25 26 27 |
# File 'lib/gherkin/formatter/model.rb', line 25 def eql?(tag) @name.eql?(tag.name) end |
#hash ⇒ Object
29 30 31 |
# File 'lib/gherkin/formatter/model.rb', line 29 def hash @name.hash end |