Class: ActiveFedora::DelegatedAttribute

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

Overview

Represents the mapping between a model attribute and a property

Direct Known Subclasses

ActiveTripleAttribute, StreamAttribute

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field, args = {}) ⇒ DelegatedAttribute

Returns a new instance of DelegatedAttribute.



7
8
9
10
# File 'lib/active_fedora/delegated_attribute.rb', line 7

def initialize(field, args={})
  self.field = field
  self.multiple = args.fetch(:multiple, false)
end

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



5
6
7
# File 'lib/active_fedora/delegated_attribute.rb', line 5

def field
  @field
end

#multipleObject

Returns the value of attribute multiple.



5
6
7
# File 'lib/active_fedora/delegated_attribute.rb', line 5

def multiple
  @multiple
end