Class: Searching::GuideProgress::TotalAssignments
- Inherits:
-
NumericFilter
- Object
- BaseFilter
- NumericFilter
- Searching::GuideProgress::TotalAssignments
- Includes:
- QueryOperands
- Defined in:
- lib/mumuki/classroom/models/searching/guide_progress.rb
Instance Method Summary collapse
Methods included from QueryOperands
#close_to, #default_query_operand, #less_than, #more_than
Methods included from QueryOperands
#current_query_operand, #current_query_operand_method
Methods inherited from NumericFilter
Methods inherited from BaseFilter
Instance Method Details
#pipeline ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 51 def pipeline [ { '$addFields': {'stats.total': {'$sum': %w($stats.passed $stats.passed_with_warnings $stats.failed)}} }, { '$match': {'stats.total': current_query_operand } } ] end |