Exception: LedgerSync::ResourceAttributeError::TypeError

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

Instance Attribute Summary collapse

Attributes inherited from Error

#message

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ TypeError

Returns a new instance of TypeError.



8
9
10
11
12
13
14
# File 'lib/ledger_sync/error/resource_errors.rb', line 8

def initialize(args = {})
  @attribute      = args.fetch(:attribute)
  @resource_class = args.fetch(:resource_class)
  @value          = args.fetch(:value)

  super(message: generate_message)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



6
7
8
# File 'lib/ledger_sync/error/resource_errors.rb', line 6

def attribute
  @attribute
end

#resource_classObject (readonly)

Returns the value of attribute resource_class.



6
7
8
# File 'lib/ledger_sync/error/resource_errors.rb', line 6

def resource_class
  @resource_class
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/ledger_sync/error/resource_errors.rb', line 6

def value
  @value
end