Class: Puppet::Pops::Types::ExpectedActualMismatch Private
- 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.
Direct Known Subclasses
Instance Attribute Summary collapse
- #actual ⇒ Object readonly private
- #expected ⇒ Object readonly private
Attributes inherited from Mismatch
Instance Method Summary collapse
- #==(o) ⇒ Object private
- #hash ⇒ Object private
-
#initialize(path, expected, actual) ⇒ ExpectedActualMismatch
constructor
private
A new instance of ExpectedActualMismatch.
Methods inherited from Mismatch
#canonical_path, #chop_path, #eql?, #format, #merge, #message, #path_string, #to_s
Constructor Details
#initialize(path, expected, actual) ⇒ ExpectedActualMismatch
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 ExpectedActualMismatch.
250 251 252 253 254 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 250 def initialize(path, expected, actual) super(path) @expected = (expected.is_a?(Array) ? PVariantType.maybe_create(expected) : expected).normalize @actual = actual.normalize end |
Instance Attribute Details
#actual ⇒ Object (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.
248 249 250 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 248 def actual @actual end |
#expected ⇒ Object (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.
248 249 250 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 248 def expected @expected 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.
256 257 258 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 256 def ==(o) super.==(o) && expected == o.expected && actual == o.actual end |
#hash ⇒ 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.
260 261 262 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 260 def hash [canonical_path, expected, actual].hash end |