Exception: Pragma::Decorator::Association::UnexpandedAssociationParent
- Inherits:
-
ExpansionError
- Object
- StandardError
- ExpansionError
- Pragma::Decorator::Association::UnexpandedAssociationParent
- Defined in:
- lib/pragma/decorator/association/errors.rb
Overview
This is raised when the user expanded a nested association without expanding its parent.
Instance Attribute Summary collapse
-
#child ⇒ String|Symbol
readonly
The name of the child association.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(child, parent) ⇒ UnexpandedAssociationParent
constructor
Initializes the error.
Constructor Details
#initialize(child, parent) ⇒ UnexpandedAssociationParent
Initializes the error.
38 39 40 41 42 43 |
# File 'lib/pragma/decorator/association/errors.rb', line 38 def initialize(child, parent) @child = child @parent = parent super "The '#{child}' association is expanded, but its parent '#{parent}' is not." end |
Instance Attribute Details
#child ⇒ String|Symbol (readonly)
Returns the name of the child association.
32 33 34 |
# File 'lib/pragma/decorator/association/errors.rb', line 32 def child @child end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
32 |
# File 'lib/pragma/decorator/association/errors.rb', line 32 attr_reader :child, :parent |