Exception: Ardm::Property::InvalidValueError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

#propertyObject (readonly)

Returns the value of attribute property.



6
7
8
# File 'lib/ardm/property/invalid_value_error.rb', line 6

def property
  @property
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/ardm/property/invalid_value_error.rb', line 6

def value
  @value
end