Exception: ActiveFedora::UnknownAttributeError
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- ActiveFedora::UnknownAttributeError
- Defined in:
- lib/active_fedora/errors.rb
Overview
Raised when attempting to access an attribute that has not been defined
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record, attribute, klass = nil) ⇒ UnknownAttributeError
constructor
A new instance of UnknownAttributeError.
Constructor Details
#initialize(record, attribute, klass = nil) ⇒ UnknownAttributeError
Returns a new instance of UnknownAttributeError.
14 15 16 17 18 |
# File 'lib/active_fedora/errors.rb', line 14 def initialize(record, attribute, klass = nil) @record = record @attribute = attribute super("unknown attribute '#{attribute}' for #{klass || @record.class}.") end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
12 13 14 |
# File 'lib/active_fedora/errors.rb', line 12 def attribute @attribute end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
12 13 14 |
# File 'lib/active_fedora/errors.rb', line 12 def record @record end |