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

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ TypePathElement

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TypePathElement.



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

def initialize(key)
  @key = key
end

Instance Attribute Details

#keyObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def key
  @key
end

Instance Method Details

#==(o) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

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

#eql?(o) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


21
22
23
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 21

def eql?(o)
  self == o
end

#hashObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def hash
  key.hash
end