Class: Hyrax::Workflow::StatusListService
- Inherits:
-
Object
- Object
- Hyrax::Workflow::StatusListService
- Defined in:
- app/services/hyrax/workflow/status_list_service.rb
Overview
Finds a list of works that we can perform a workflow action on
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#each ⇒ Array<StatusRow>
TODO: We will want to paginate this.
-
#initialize(context, filter_condition) ⇒ StatusListService
constructor
A new instance of StatusListService.
-
#user ⇒ Object
TODO: Make this private for version 1.0.
Constructor Details
#initialize(context, filter_condition) ⇒ StatusListService
Returns a new instance of StatusListService.
7 8 9 10 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 7 def initialize(context, filter_condition) @context = context @filter_condition = filter_condition end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
12 13 14 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 12 def context @context end |
Instance Method Details
#each ⇒ Array<StatusRow>
TODO: We will want to paginate this
16 17 18 19 20 21 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 16 def each return enum_for(:each) unless block_given? solr_documents.each do |doc| yield doc end end |
#user ⇒ Object
TODO: Make this private for version 1.0
24 25 26 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 24 def user context.current_user end |