Exception: Fortnox::ConstraintError
- Inherits:
-
AttributeError
- Object
- StandardError
- Error
- AttributeError
- Fortnox::ConstraintError
- Defined in:
- lib/fortnox.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attribute_name, value, message = nil) ⇒ ConstraintError
constructor
A new instance of ConstraintError.
Constructor Details
#initialize(attribute_name, value, message = nil) ⇒ ConstraintError
Returns a new instance of ConstraintError.
76 77 78 79 80 |
# File 'lib/fortnox.rb', line 76 def initialize(attribute_name, value, = nil) @attribute_name = attribute_name @value = value super( || "Constraint violation for attribute '#{attribute_name}' with value: #{value.inspect}") end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
74 75 76 |
# File 'lib/fortnox.rb', line 74 def attribute_name @attribute_name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
74 75 76 |
# File 'lib/fortnox.rb', line 74 def value @value end |