Class: Access::Aggregations
- Inherits:
-
Object
- Object
- Access::Aggregations
- Includes:
- MuchMeta
- Defined in:
- lib/access/aggregations.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(values) ⇒ Aggregations
constructor
A new instance of Aggregations.
Methods included from MuchMeta
Constructor Details
#initialize(values) ⇒ Aggregations
Returns a new instance of Aggregations.
9 10 11 12 13 14 15 |
# File 'lib/access/aggregations.rb', line 9 def initialize(values) @used_fields = [] set_up_methods(values) set_values(values) @subcategories = Access::Category.process_batch(@subcategories) if @subcategories @facets = Access::Aggregations.process_batch(@facets) if @facets end |
Class Method Details
.process_batch(chunk) ⇒ Object
5 6 7 |
# File 'lib/access/aggregations.rb', line 5 def self.process_batch(chunk) chunk.map { |aggs| new(aggs) } end |