Exception: LedgerSync::ResourceError::ReferenceAssignmentError

Inherits:
LedgerSync::ResourceError show all
Defined in:
lib/ledger_sync/error/resource_errors.rb

Instance Attribute Summary

Attributes inherited from LedgerSync::ResourceError

#resource

Attributes inherited from Error

#message

Instance Method Summary collapse

Constructor Details

#initialize(attribute:, resource:, value:) ⇒ ReferenceAssignmentError

Returns a new instance of ReferenceAssignmentError.



60
61
62
63
64
65
# File 'lib/ledger_sync/error/resource_errors.rb', line 60

def initialize(attribute:, resource:, value:)
  resource_class = resource.class
  message = "Attribute #{attribute} value for #{resource_class.name} should be a #{asdf}.  Given: #{value.class}"

  super(message: message, resource: resource)
end