Class: Puppet::Pops::Types::KeyMismatch Abstract Private

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

Overview

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.

This class is abstract.

API:

  • private

Direct Known Subclasses

ExtraneousKey, MissingKey, MissingParameter

Instance Attribute Summary collapse

Attributes inherited from Mismatch

#path

Instance Method Summary collapse

Methods inherited from Mismatch

#canonical_path, #chop_path, #eql?, #format, #merge, #message, #path_string, #to_s

Constructor Details

#initialize(path, key) ⇒ KeyMismatch

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 KeyMismatch.

API:

  • private



210
211
212
213
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 210

def initialize(path, key)
  super(path)
  @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.

API:

  • private



208
209
210
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 208

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.

API:

  • private



215
216
217
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 215

def ==(o)
  super.==(o) && key == o.key
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.

API:

  • private



219
220
221
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 219

def hash
  super.hash ^ key.hash
end