Exception: Objectmancy::AttributeAlreadyDefinedError
- Inherits:
-
StandardError
- Object
- StandardError
- Objectmancy::AttributeAlreadyDefinedError
- Defined in:
- lib/objectmancy/errors.rb
Overview
Error for defining attributes with the same name
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
Instance Method Summary collapse
-
#initialize(attribute) ⇒ AttributeAlreadyDefinedError
constructor
Creates a new AttributeAlreadyDefinedError.
-
#message ⇒ String
Message for logging.
Constructor Details
#initialize(attribute) ⇒ AttributeAlreadyDefinedError
Creates a new AttributeAlreadyDefinedError
9 10 11 |
# File 'lib/objectmancy/errors.rb', line 9 def initialize(attribute) @attribute = attribute end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/objectmancy/errors.rb', line 4 def attribute @attribute end |
Instance Method Details
#message ⇒ String
Message for logging
17 18 19 |
# File 'lib/objectmancy/errors.rb', line 17 def "#{attribute} has already been defined." end |