Exception: LedgerSync::ResourceError::AttributeTypeError
- Inherits:
-
LedgerSync::ResourceError
- Object
- StandardError
- Error
- LedgerSync::ResourceError
- LedgerSync::ResourceError::AttributeTypeError
- Defined in:
- lib/ledger_sync/error/resource_errors.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(attribute:, resource:, value:) ⇒ AttributeTypeError
constructor
A new instance of AttributeTypeError.
Constructor Details
#initialize(attribute:, resource:, value:) ⇒ AttributeTypeError
Returns a new instance of AttributeTypeError.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ledger_sync/error/resource_errors.rb', line 12 def initialize(attribute:, resource:, value:) @attribute = attribute @resource = resource @value = value resource_class = resource.class = attribute.type.( attribute: attribute, resource: resource, value: value ) super(message: , resource: nil) end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
10 11 12 |
# File 'lib/ledger_sync/error/resource_errors.rb', line 10 def attribute @attribute end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
10 11 12 |
# File 'lib/ledger_sync/error/resource_errors.rb', line 10 def resource @resource end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/ledger_sync/error/resource_errors.rb', line 10 def value @value end |