Sha256: dbe4816e6cfbca3de1a31ef313defe560326e436087a77303c9a7b609e7fc121
Contents?: true
Size: 938 Bytes
Versions: 32
Compression:
Stored size: 938 Bytes
Contents
module Krikri ## # 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. # # @see Krikri::EntityBehavior # class AggregationEntityBehavior < Krikri::EntityBehavior ## # @param load [Boolean] Whether to load the whole record from the LDP # server. Default: true. # DPLA::MAP::Aggregation#get is slow, because it # results in a network request, so this provides the # possibility of avoiding it. # @see Krikri::EntityBehavior::entities # @return [Enumerator] DPLA::MAP::Aggregation objects # def entities(load = true) @activity.entity_uris.lazy.map do |uri| agg = DPLA::MAP::Aggregation.new(uri) agg.get if load agg end end end end
Version data entries
32 entries across 32 versions & 1 rubygems