Exception: TransferConstraintError
- Inherits:
-
StandardError
- Object
- StandardError
- TransferConstraintError
- Defined in:
- backend/app/lib/exceptions.rb
Instance Attribute Summary collapse
-
#conflicts ⇒ Object
Returns the value of attribute conflicts.
Instance Method Summary collapse
-
#add_conflict(uri, property) ⇒ Object
-
#initialize(conflicts = {}) ⇒ TransferConstraintError
constructor
A new instance of TransferConstraintError.
-
#to_s ⇒ Object
Constructor Details
#initialize(conflicts = {}) ⇒ TransferConstraintError
Returns a new instance of TransferConstraintError.
57 58 59 |
# File 'backend/app/lib/exceptions.rb', line 57 def initialize(conflicts = {}) @conflicts = conflicts end |
Instance Attribute Details
#conflicts ⇒ Object
Returns the value of attribute conflicts
55 56 57 |
# File 'backend/app/lib/exceptions.rb', line 55 def conflicts @conflicts end |
Instance Method Details
#add_conflict(uri, property) ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'backend/app/lib/exceptions.rb', line 61 def add_conflict(uri, property) if property.is_a? Hash @conflicts[uri] ||= [] @conflicts[uri] << property else @conflicts[uri] = property end end |
#to_s ⇒ Object
70 71 72 |
# File 'backend/app/lib/exceptions.rb', line 70 def to_s "#<#{self.class}: #{@conflicts.inspect}>" end |