Class: ActiveFedora::Aggregation::ProxyRepository

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

Overview

Repository for Proxies. This repository is responsible for decorating a proxy such that it’s useful for aggregation and is an attempt at centralizing hard-coded dependencies without a dependency injection container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner, base_proxy_factory) ⇒ #find, #new

Returns A repository which can return proxies useful for aggregation.

Parameters:

  • owner (ActiveFedora::Base)

    The node which proxy will assert order on.

  • base_proxy_factory (#find, #new)

    The base factory which returns proxies that will be decorated.



15
16
17
18
19
# File 'lib/active_fedora/aggregation/proxy_repository.rb', line 15

def initialize(owner, base_proxy_factory)
  @owner = owner
  @base_proxy_factory = base_proxy_factory
  super(repository)
end

Instance Attribute Details

#base_proxy_factoryObject (readonly)

Returns the value of attribute base_proxy_factory.



8
9
10
# File 'lib/active_fedora/aggregation/proxy_repository.rb', line 8

def base_proxy_factory
  @base_proxy_factory
end

#ownerObject (readonly)

Returns the value of attribute owner.



8
9
10
# File 'lib/active_fedora/aggregation/proxy_repository.rb', line 8

def owner
  @owner
end