Class: Cuprum::Collections::Errors::MissingDefaultContract
- Inherits:
-
Error
- Object
- Error
- Cuprum::Collections::Errors::MissingDefaultContract
- Defined in:
- lib/cuprum/collections/errors/missing_default_contract.rb
Overview
Error returned when validating an entity without a contract.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.collections.errors.missing_default_contract'
Instance Attribute Summary collapse
-
#entity_class ⇒ Class
readonly
The class of the assigned entity.
Instance Method Summary collapse
-
#initialize(entity_class:) ⇒ MissingDefaultContract
constructor
A new instance of MissingDefaultContract.
Constructor Details
#initialize(entity_class:) ⇒ MissingDefaultContract
Returns a new instance of MissingDefaultContract.
14 15 16 17 18 19 20 21 |
# File 'lib/cuprum/collections/errors/missing_default_contract.rb', line 14 def initialize(entity_class:) @entity_class = entity_class super( entity_class: entity_class, message: ) end |
Instance Attribute Details
#entity_class ⇒ Class (readonly)
Returns the class of the assigned entity.
24 25 26 |
# File 'lib/cuprum/collections/errors/missing_default_contract.rb', line 24 def entity_class @entity_class end |