Class: Krikri::AggregationEntityBehavior
- Inherits:
-
EntityBehavior
- Object
- EntityBehavior
- Krikri::AggregationEntityBehavior
- Defined in:
- lib/krikri/entity_behaviors/aggregation_entity_behavior.rb
Overview
A behavior that provides methods for working with aggregations (as defined by DPLA::MAP::Aggregation), in the context of entities that are generated by activities.
Instance Attribute Summary
Attributes inherited from EntityBehavior
Instance Method Summary collapse
-
#entities(load = true) ⇒ Enumerator
DPLA::MAP::Aggregation objects.
Methods inherited from EntityBehavior
Constructor Details
This class inherits a constructor from Krikri::EntityBehavior
Instance Method Details
#entities(load = true) ⇒ Enumerator
Returns DPLA::MAP::Aggregation objects.
21 22 23 24 25 26 27 |
# File 'lib/krikri/entity_behaviors/aggregation_entity_behavior.rb', line 21 def entities(load = true) @activity.entity_uris.lazy.map do |uri| agg = DPLA::MAP::Aggregation.new(uri) agg.get if load agg end end |