Exception: PipeLineDealer::Error::InvalidAttributeValue

Inherits:
InvalidAttribute show all
Defined in:
lib/pipe_line_dealer/error/invalid_attribute.rb

Instance Attribute Summary collapse

Attributes inherited from InvalidAttribute

#attribute_name

Attributes inherited from PipeLineDealer::Error

#message

Instance Method Summary collapse

Methods inherited from PipeLineDealer::Error

#to_s

Constructor Details

#initialize(klass, attribute_name, value) ⇒ InvalidAttributeValue

Returns a new instance of InvalidAttributeValue.



22
23
24
25
26
# File 'lib/pipe_line_dealer/error/invalid_attribute.rb', line 22

def initialize(klass, attribute_name, value)
  super(klass, attribute_name)
  @value = value
  @message = "The attribute #{attribute_name.inspect} does not accept the value #{value.inspect} (on model #{klass.inspect})"
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20
21
22
# File 'lib/pipe_line_dealer/error/invalid_attribute.rb', line 20

def value
  @value
end