Class: Gherkin::Formatter::Model::Tag

Inherits:
Hashable
  • Object
show all
Defined in:
lib/gherkin/formatter/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Hashable

#to_hash

Constructor Details

#initialize(name, line) ⇒ Tag

Returns a new instance of Tag.



182
183
184
# File 'lib/gherkin/formatter/model.rb', line 182

def initialize(name, line)
  @name, @line = name, line
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



180
181
182
# File 'lib/gherkin/formatter/model.rb', line 180

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name.



180
181
182
# File 'lib/gherkin/formatter/model.rb', line 180

def name
  @name
end

Instance Method Details

#eql?(tag) ⇒ Boolean

Returns:

  • (Boolean)


186
187
188
# File 'lib/gherkin/formatter/model.rb', line 186

def eql?(tag)
  @name.eql?(tag.name)
end

#hashObject



190
191
192
# File 'lib/gherkin/formatter/model.rb', line 190

def hash
  @name.hash
end