Class: Mongoid::Criteria
- Inherits:
-
Object
- Object
- Mongoid::Criteria
- Defined in:
- lib/reductor.rb
Instance Method Summary collapse
Instance Method Details
#reduction(reduction_type, out: :inline, options: {}) ⇒ Object
4 5 6 7 |
# File 'lib/reductor.rb', line 4 def reduction(reduction_type, out: :inline, options: {}) reductor = Reductor.new(self, reduction_type, ) Hash[reductor.reduce.out(inline: true).map{|e| [e['_id'], e["value"]] }] end |