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.



169
170
171
# File 'lib/gherkin/formatter/model.rb', line 169

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



167
168
169
# File 'lib/gherkin/formatter/model.rb', line 167

def line
  @line
end

#nameObject (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

Returns:

  • (Boolean)


173
174
175
# File 'lib/gherkin/formatter/model.rb', line 173

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

#hashObject



177
178
179
# File 'lib/gherkin/formatter/model.rb', line 177

def hash
  @name.hash
end