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

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

Overview

This class is abstract.

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, #merge, #message, #path_string, #to_s

Constructor Details

#initialize(path, key) ⇒ KeyMismatch

Returns a new instance of KeyMismatch.



130
131
132
133
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 130

def initialize(path, key)
  super(path)
  @key = key
end

Instance Attribute Details

#keyObject (readonly)



128
129
130
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 128

def key
  @key
end

Instance Method Details

#==(o) ⇒ Object



135
136
137
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 135

def ==(o)
  super.==(o) && key == o.key
end

#hashObject



139
140
141
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 139

def hash
  super.hash * 31 + key.hash
end