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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of DelegatedAttribute.



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

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

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



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

def field
  @field
end

#multipleObject

Returns the value of attribute multiple.



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

def multiple
  @multiple
end