Module: Hydra::PCDM::CollectionBehavior
- Extended by:
- ActiveSupport::Concern
- Included in:
- Collection
- Defined in:
- lib/hydra/pcdm/models/concerns/collection_behavior.rb
Overview
6) Hydra::PCDM::Collection can have descriptive metadata
7) Hydra::PCDM::Collection can have access
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #collection_ids ⇒ Object
- #collections ⇒ Object
- #ordered_collection_ids ⇒ Object
- #ordered_collections ⇒ Object
- #pcdm_collection? ⇒ Boolean
- #pcdm_object? ⇒ Boolean
Instance Method Details
#collection_ids ⇒ Object
35 36 37 |
# File 'lib/hydra/pcdm/models/concerns/collection_behavior.rb', line 35 def collection_ids members.select(&:pcdm_collection?).map(&:id) end |
#collections ⇒ Object
31 32 33 |
# File 'lib/hydra/pcdm/models/concerns/collection_behavior.rb', line 31 def collections members.select(&:pcdm_collection?) end |
#ordered_collection_ids ⇒ Object
43 44 45 |
# File 'lib/hydra/pcdm/models/concerns/collection_behavior.rb', line 43 def ordered_collection_ids ordered_collections.map(&:id) end |
#ordered_collections ⇒ Object
39 40 41 |
# File 'lib/hydra/pcdm/models/concerns/collection_behavior.rb', line 39 def ordered_collections ordered_members.to_a.select(&:pcdm_collection?) end |
#pcdm_collection? ⇒ Boolean
51 52 53 |
# File 'lib/hydra/pcdm/models/concerns/collection_behavior.rb', line 51 def pcdm_collection? true end |
#pcdm_object? ⇒ Boolean
47 48 49 |
# File 'lib/hydra/pcdm/models/concerns/collection_behavior.rb', line 47 def pcdm_object? false end |