Class: FieldProxy
- Inherits:
-
Object
- Object
- FieldProxy
- Defined in:
- lib/active_fedora/crosswalks/accessors/field_proxy.rb
Instance Attribute Summary collapse
-
#accessor ⇒ Object
Returns the value of attribute accessor.
-
#array ⇒ Object
Returns the value of attribute array.
-
#field ⇒ Object
Returns the value of attribute field.
Instance Method Summary collapse
- #<<(value) ⇒ Object
-
#initialize(array, accessor, field) ⇒ FieldProxy
constructor
A new instance of FieldProxy.
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
#accessor ⇒ Object
Returns the value of attribute accessor.
2 3 4 |
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 2 def accessor @accessor end |
#array ⇒ Object
Returns the value of attribute array.
2 3 4 |
# File 'lib/active_fedora/crosswalks/accessors/field_proxy.rb', line 2 def array @array end |
#field ⇒ Object
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 |