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 441 def actual_string 442 a = actual 443 a.is_a?(PStringType) && !a.value.nil? ? "'#{a.value}'" : short_name(a) 444 end
message(variant, position)
click to toggle source
# File lib/puppet/pops/types/type_mismatch_describer.rb 431 def message(variant, position) 432 e = expected 433 value_pfx = '' 434 if e.is_a?(POptionalType) 435 e = e.optional_type 436 value_pfx = 'an undef value or ' 437 end 438 "#{variant}#{position} expects #{value_pfx}a match for #{e.to_alias_expanded_s}, got #{actual_string}" 439 end