Class: Lycra::Search::Aggregations
- Inherits:
-
Array
- Object
- Array
- Lycra::Search::Aggregations
- Defined in:
- lib/lycra/search/aggregations.rb
Instance Method Summary collapse
- #to_query ⇒ Object (also: #to_q)
Instance Method Details
#to_query ⇒ Object Also known as: to_q
4 5 6 7 8 9 10 11 |
# File 'lib/lycra/search/aggregations.rb', line 4 def to_query return {} if empty? # can probably inject here or be a bit more elegant? aggregations = {} each { |agg| aggregations.merge!(agg) } aggregations end |