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.
8 9 10 11 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 8 def initialize(context, filter_condition) @context = context @filter_condition = filter_condition end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
13 14 15 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 13 def context @context end |
Instance Method Details
#each ⇒ Array<StatusRow>
TODO: We will want to paginate this
17 18 19 20 21 22 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 17 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
25 26 27 |
# File 'app/services/hyrax/workflow/status_list_service.rb', line 25 def user context.current_user end |