Class: FieldProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/active_fedora/crosswalks/accessors/field_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array, accessor, field) ⇒ FieldProxy

Returns a new instance of FieldProxy.



4
5
6
7
8
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 4

def initialize(array, accessor, field)
  self.array = array
  self.accessor = accessor
  self.field = field
end

Instance Attribute Details

#accessorObject

Returns the value of attribute accessor.



2
3
4
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 2

def accessor
  @accessor
end

#arrayObject

Returns the value of attribute array.



2
3
4
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 2

def array
  @array
end

#fieldObject

Returns the value of attribute field.



2
3
4
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 2

def field
  @field
end

Instance Method Details

#<<(value) ⇒ Object



9
10
11
12
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 9

def << (value)
  array << value
  accessor.set_value(field, array)
end