Class: Puppet::Pops::Types::PatternMismatch Private
- Inherits:
-
TypeMismatch
- Object
- Mismatch
- ExpectedActualMismatch
- TypeMismatch
- Puppet::Pops::Types::PatternMismatch
- 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.
Constant Summary
Constants included from LabelProvider
LabelProvider::A, LabelProvider::AN, LabelProvider::SKIPPED_CHARACTERS, LabelProvider::VOWELS
Instance Attribute Summary
Attributes inherited from ExpectedActualMismatch
Attributes inherited from Mismatch
Instance Method Summary collapse
- #actual_string ⇒ Object private
- #message(variant, position) ⇒ Object private
Methods inherited from TypeMismatch
Methods included from LabelProvider
#a_an, #a_an_uc, #article, #label, #plural_s, #the, #the_uc
Methods inherited from ExpectedActualMismatch
#==, #hash, #initialize, #swap_expected
Methods inherited from Mismatch
#==, #canonical_path, #chop_path, #eql?, #format, #hash, #initialize, #merge, #path_string, #to_s
Constructor Details
This class inherits a constructor from Puppet::Pops::Types::ExpectedActualMismatch
Instance Method Details
#actual_string ⇒ 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.
465 466 467 468 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 465 def actual_string a = actual a.is_a?(PStringType) && a.values.size == 1 ? "'#{a.values[0]}'" : a.simple_name end |
#message(variant, position) ⇒ 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.
461 462 463 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 461 def (variant, position) "#{variant}#{position} expects a match for #{expected.to_alias_expanded_s}, got #{actual_string}" end |