Exception: ActiveFedora::UnknownAttributeError

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/active_fedora/errors.rb

Overview

Raised when attempting to access an attribute that has not been defined

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributeObject (readonly)

Returns the value of attribute attribute.



12
13
14
# File 'lib/active_fedora/errors.rb', line 12

def attribute
  @attribute
end

#recordObject (readonly)

Returns the value of attribute record.



12
13
14
# File 'lib/active_fedora/errors.rb', line 12

def record
  @record
end