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.



202
203
204
# File 'lib/gherkin/formatter/model.rb', line 202

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



200
201
202
# File 'lib/gherkin/formatter/model.rb', line 200

def line
  @line
end

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

Returns:

  • (Boolean)


206
207
208
# File 'lib/gherkin/formatter/model.rb', line 206

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

#hashObject



210
211
212
# File 'lib/gherkin/formatter/model.rb', line 210

def hash
  @name.hash
end