Class: ActiveFedora::Aggregation::LinkInserter::Appender

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, proxy) ⇒ Appender

Returns a new instance of Appender.



38
39
40
41
# File 'lib/active_fedora/aggregation/link_inserter.rb', line 38

def initialize(root, proxy)
  @root = root
  @proxy = proxy
end

Instance Attribute Details

#proxyObject (readonly)

Returns the value of attribute proxy.



37
38
39
# File 'lib/active_fedora/aggregation/link_inserter.rb', line 37

def proxy
  @proxy
end

#rootObject (readonly)

Returns the value of attribute root.



37
38
39
# File 'lib/active_fedora/aggregation/link_inserter.rb', line 37

def root
  @root
end

Instance Method Details

#callObject



43
44
45
46
47
# File 'lib/active_fedora/aggregation/link_inserter.rb', line 43

def call
  last_proxy.next = proxy
  proxy.prev = last_proxy
  root.tail = proxy
end