Exception: Decoradar::AttributeNotFound
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Decoradar::AttributeNotFound
- Defined in:
- lib/decoradar/errors.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#decorated ⇒ Object
readonly
Returns the value of attribute decorated.
Instance Method Summary collapse
-
#initialize(decorated, attribute_name) ⇒ AttributeNotFound
constructor
A new instance of AttributeNotFound.
- #message ⇒ Object
Constructor Details
#initialize(decorated, attribute_name) ⇒ AttributeNotFound
Returns a new instance of AttributeNotFound.
5 6 7 8 9 |
# File 'lib/decoradar/errors.rb', line 5 def initialize(decorated, attribute_name) @decorated = decorated @attribute_name = attribute_name super() end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
3 4 5 |
# File 'lib/decoradar/errors.rb', line 3 def attribute_name @attribute_name end |
#decorated ⇒ Object (readonly)
Returns the value of attribute decorated.
3 4 5 |
# File 'lib/decoradar/errors.rb', line 3 def decorated @decorated end |
Instance Method Details
#message ⇒ Object
11 12 13 |
# File 'lib/decoradar/errors.rb', line 11 def "Attribute ##{attribute_name} not implemented on model #{decorated.class}" end |