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,
21 22 23 24 25 |
# File 'lib/puppet/pops/types/type_assertion_error.rb', line 21 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
13 14 15 |
# File 'lib/puppet/pops/types/type_assertion_error.rb', line 13 def actual_type @actual_type end |
#expected_type ⇒ PAnyType (readonly)
Returns the expected type
9 10 11 |
# File 'lib/puppet/pops/types/type_assertion_error.rb', line 9 def expected_type @expected_type end |