Class: Puppet::Pops::Types::TypePathElement

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/pops/types/type_mismatch_describer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ TypePathElement

Returns a new instance of TypePathElement.



8
9
10
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 8

def initialize(key)
  @key = key
end

Instance Attribute Details

#keyObject (readonly)



6
7
8
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 6

def key
  @key
end

Instance Method Details

#==(o) ⇒ Object Also known as: eql?



16
17
18
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 16

def ==(o)
  self.class == o.class && key == o.key
end

#hashObject



12
13
14
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 12

def hash
  key.hash
end