Class: Hyrax::CollectionMemberService
- Inherits:
-
Object
- Object
- Hyrax::CollectionMemberService
- Includes:
- Blacklight::Configurable, Blacklight::SearchHelper
- Defined in:
- app/services/hyrax/collection_member_service.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
Class Method Summary collapse
Instance Method Summary collapse
- #collection_search_builder ⇒ Object
-
#initialize(item) ⇒ CollectionMemberService
constructor
A new instance of CollectionMemberService.
- #list_collections ⇒ Object
Constructor Details
#initialize(item) ⇒ CollectionMemberService
Returns a new instance of CollectionMemberService.
16 17 18 |
# File 'app/services/hyrax/collection_member_service.rb', line 16 def initialize(item) @item = item end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
7 8 9 |
# File 'app/services/hyrax/collection_member_service.rb', line 7 def item @item end |
Class Method Details
.run(item) ⇒ Object
12 13 14 |
# File 'app/services/hyrax/collection_member_service.rb', line 12 def self.run(item) new(item).list_collections end |
Instance Method Details
#collection_search_builder ⇒ Object
26 27 28 |
# File 'app/services/hyrax/collection_member_service.rb', line 26 def collection_search_builder @collection_search_builder ||= ParentCollectionSearchBuilder.new([:include_item_ids, :add_paging_to_solr], self) end |
#list_collections ⇒ Object
20 21 22 23 24 |
# File 'app/services/hyrax/collection_member_service.rb', line 20 def list_collections query = collection_search_builder.rows(1000) resp = repository.search(query) resp.documents end |