Exception: Puppet::Pops::Types::TypeAssertionError
- Defined in:
- lib/puppet/pops/types/type_assertion_error.rb
Overview
Raised when an assertion of actual type against an expected type fails.
Instance Attribute Summary collapse
-
#actual_type ⇒ PAnyType
readonly
Returns the actual type.
-
#expected_type ⇒ PAnyType
readonly
Returns the expected type.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, expected_type, actual_type) ⇒ TypeAssertionError
constructor
Creates a new instance with a default message, expected, and actual types,.
Constructor Details
#initialize(message, expected_type, actual_type) ⇒ TypeAssertionError
Creates a new instance with a default message, expected, and actual types,
22 23 24 25 26 |
# File 'lib/puppet/pops/types/type_assertion_error.rb', line 22 def initialize(, expected_type, actual_type) super() @expected_type = expected_type @actual_type = actual_type end |
Instance Attribute Details
#actual_type ⇒ PAnyType (readonly)
Returns the actual type
14 15 16 |
# File 'lib/puppet/pops/types/type_assertion_error.rb', line 14 def actual_type @actual_type end |
#expected_type ⇒ PAnyType (readonly)
Returns the expected type
10 11 12 |
# File 'lib/puppet/pops/types/type_assertion_error.rb', line 10 def expected_type @expected_type end |