Exception: Ardm::Property::InvalidValueError
- Inherits:
-
StandardError
- Object
- StandardError
- Ardm::Property::InvalidValueError
- Defined in:
- lib/ardm/property/invalid_value_error.rb
Overview
Exception raised when Ardm is about to work with invalid property values.
Instance Attribute Summary collapse
-
#property ⇒ Object
readonly
Returns the value of attribute property.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(property, value) ⇒ InvalidValueError
constructor
A new instance of InvalidValueError.
Constructor Details
#initialize(property, value) ⇒ InvalidValueError
Returns a new instance of InvalidValueError.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ardm/property/invalid_value_error.rb', line 8 def initialize(property, value) msg = "Invalid value %s for property %s (%s) on model %s" % [ value.inspect, property.name.inspect, property.class.name, property.model.name ] super(msg) @property = property @value = value end |
Instance Attribute Details
#property ⇒ Object (readonly)
Returns the value of attribute property.
6 7 8 |
# File 'lib/ardm/property/invalid_value_error.rb', line 6 def property @property end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/ardm/property/invalid_value_error.rb', line 6 def value @value end |