Exception: Attributor::InvalidDefinition
- Inherits:
-
StandardError
- Object
- StandardError
- Attributor::InvalidDefinition
- Defined in:
- lib/attributor/types/hash.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
Instance Method Summary collapse
-
#initialize(type, cause) ⇒ InvalidDefinition
constructor
A new instance of InvalidDefinition.
Constructor Details
#initialize(type, cause) ⇒ InvalidDefinition
Returns a new instance of InvalidDefinition.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/attributor/types/hash.rb', line 3 def initialize(type, cause) type_name = if type.name type.name else type.inspect end msg = "Structure definition for type #{type_name} is invalid. The following exception has occurred: #{cause.inspect}" super(msg) @cause = cause end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
15 16 17 |
# File 'lib/attributor/types/hash.rb', line 15 def cause @cause end |