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.
10 11 12 |
# File 'app/models/pipeline/grouper_for_pipeline.rb', line 10 def initialize(pipeline) @pipeline = pipeline end |
Instance Method Details
#all(_) ⇒ Object
18 19 20 21 |
# File 'app/models/pipeline/grouper_for_pipeline.rb', line 18 def all(_) # Piplelines with grouping functionality should use a specific grouper raise 'Not implimented for this pipeline' end |
#base_scope ⇒ Object
14 15 16 |
# File 'app/models/pipeline/grouper_for_pipeline.rb', line 14 def base_scope requests.order(:id).ready_in_storage.full_inbox.select('requests.*') end |