Class: ActiveFedora::Aggregation::DecoratingRepository
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ActiveFedora::Aggregation::DecoratingRepository
- Defined in:
- lib/active_fedora/aggregation/decorating_repository.rb
Overview
Decorates the results of a repository with the given decorator.
Instance Attribute Summary collapse
-
#decorator ⇒ Object
readonly
Returns the value of attribute decorator.
Instance Method Summary collapse
- #find(id) ⇒ Object
-
#initialize(decorator, base_repository) ⇒ DecoratingRepository
constructor
A new instance of DecoratingRepository.
- #new(*args) {|result| ... } ⇒ Object
Constructor Details
#initialize(decorator, base_repository) ⇒ DecoratingRepository
Returns a new instance of DecoratingRepository.
8 9 10 11 |
# File 'lib/active_fedora/aggregation/decorating_repository.rb', line 8 def initialize(decorator, base_repository) @decorator = decorator super(base_repository) end |
Instance Attribute Details
#decorator ⇒ Object (readonly)
Returns the value of attribute decorator.
5 6 7 |
# File 'lib/active_fedora/aggregation/decorating_repository.rb', line 5 def decorator @decorator end |
Instance Method Details
#find(id) ⇒ Object
13 14 15 |
# File 'lib/active_fedora/aggregation/decorating_repository.rb', line 13 def find(id) decorate(super(id)) end |
#new(*args) {|result| ... } ⇒ Object
17 18 19 20 21 |
# File 'lib/active_fedora/aggregation/decorating_repository.rb', line 17 def new(*args) result = decorate(super(*args)) yield result if block_given? result end |