Class: LedgerSync::Domains::ValidationError

Inherits:
Error::OperationError
  • Object
show all
Defined in:
lib/ledger_sync/domains.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation:, errors:) ⇒ ValidationError

Returns a new instance of ValidationError.



39
40
41
42
43
# File 'lib/ledger_sync/domains.rb', line 39

def initialize(operation:, errors:)
  @errors = errors
  message = 'Operation arguments are invalid. Please check your errors.'
  super(message: message, operation: operation)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



37
38
39
# File 'lib/ledger_sync/domains.rb', line 37

def errors
  @errors
end

Instance Method Details

#inspectObject



45
46
47
# File 'lib/ledger_sync/domains.rb', line 45

def inspect
  "#<#{self.class}: #{message} (errors: #{errors.inspect})>"
end