Exception: Decoradar::AttributeNotFound

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/decoradar/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (readonly)

Returns the value of attribute attribute_name.



3
4
5
# File 'lib/decoradar/errors.rb', line 3

def attribute_name
  @attribute_name
end

#decoratedObject (readonly)

Returns the value of attribute decorated.



3
4
5
# File 'lib/decoradar/errors.rb', line 3

def decorated
  @decorated
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/decoradar/errors.rb', line 11

def message
  "Attribute ##{attribute_name} not implemented on model #{decorated.class}"
end