Class: Pipeline::GrouperForPipeline
- Inherits:
-
Object
- Object
- Pipeline::GrouperForPipeline
- Defined in:
- app/models/pipeline/grouper_for_pipeline.rb
Overview
Some pipelines group requests together in the inbox, such that all requests in a submission or plate MUST be selected together This takes the selected checkboxes and splits the information back out to the individual requests. This class is the base class, the actual behaviour is on the various subclasses
Direct Known Subclasses
GrouperByParent, GrouperByParentAndSubmission, GrouperBySubmission
Instance Method Summary collapse
- #all(_) ⇒ Object
- #base_scope ⇒ Object
-
#initialize(pipeline) ⇒ GrouperForPipeline
constructor
A new instance of GrouperForPipeline.
Constructor Details
#initialize(pipeline) ⇒ GrouperForPipeline
Returns a new instance of GrouperForPipeline.
9 10 11 |
# File 'app/models/pipeline/grouper_for_pipeline.rb', line 9 def initialize(pipeline) @pipeline = pipeline end |
Instance Method Details
#all(_) ⇒ Object
20 21 22 23 |
# File 'app/models/pipeline/grouper_for_pipeline.rb', line 20 def all(_) # Piplelines with grouping functionality should use a specific grouper raise 'Not implimented for this pipeline' end |
#base_scope ⇒ Object
13 14 15 16 17 18 |
# File 'app/models/pipeline/grouper_for_pipeline.rb', line 13 def base_scope requests.order(:id) .ready_in_storage .full_inbox .select('requests.*') end |