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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lineObject (readonly)

Returns the value of attribute line.



19
20
21
# File 'lib/gherkin/formatter/model.rb', line 19

def line
  @line
end

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

Returns:

  • (Boolean)


25
26
27
# File 'lib/gherkin/formatter/model.rb', line 25

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

#hashObject



29
30
31
# File 'lib/gherkin/formatter/model.rb', line 29

def hash
  @name.hash
end