Class: ElasticRecord::AggregationResponse::MultiBucketAggregation

Inherits:
Aggregation
  • Object
show all
Defined in:
lib/elastic_record/aggregation_response/multi_bucket_aggregation.rb

Instance Attribute Summary

Attributes inherited from Aggregation

#meta, #name, #results

Instance Method Summary collapse

Methods inherited from Aggregation

#initialize, #inspect

Constructor Details

This class inherits a constructor from ElasticRecord::AggregationResponse::Aggregation

Instance Method Details

#bucketsObject



4
5
6
# File 'lib/elastic_record/aggregation_response/multi_bucket_aggregation.rb', line 4

def buckets
  @buckets ||= results['buckets'].map { |bucket| ElasticRecord::AggregationResponse::Bucket.new(bucket) }
end