Exception: Fortnox::ConstraintError

Inherits:
AttributeError show all
Defined in:
lib/fortnox.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_name, value, message = nil) ⇒ ConstraintError

Returns a new instance of ConstraintError.



79
80
81
82
83
# File 'lib/fortnox.rb', line 79

def initialize(attribute_name, value, message = nil)
  @attribute_name = attribute_name
  @value = value
  super(message || "Constraint violation for attribute '#{attribute_name}' with value: #{value.inspect}")
end

Instance Attribute Details

#attribute_nameObject (readonly)

Returns the value of attribute attribute_name.



77
78
79
# File 'lib/fortnox.rb', line 77

def attribute_name
  @attribute_name
end

#valueObject (readonly)

Returns the value of attribute value.



77
78
79
# File 'lib/fortnox.rb', line 77

def value
  @value
end