class Puppet::Pops::Types::PatternMismatch
@api private
Public Instance Methods
actual_string()
click to toggle source
# File lib/puppet/pops/types/type_mismatch_describer.rb 442 def actual_string 443 a = actual 444 a.is_a?(PStringType) && !a.value.nil? ? "'#{a.value}'" : short_name(a) 445 end
message(variant, position)
click to toggle source
# File lib/puppet/pops/types/type_mismatch_describer.rb 432 def message(variant, position) 433 e = expected 434 value_pfx = '' 435 if e.is_a?(POptionalType) 436 e = e.optional_type 437 value_pfx = 'an undef value or ' 438 end 439 "#{variant}#{position} expects #{value_pfx}a match for #{e.to_alias_expanded_s}, got #{actual_string}" 440 end