Class: Arelastic::Aggregations::SpecialSingleBucket
- Inherits:
-
Bucket
- Object
- Nodes::Node
- Aggregation
- Bucket
- Arelastic::Aggregations::SpecialSingleBucket
- Defined in:
- lib/arelastic/aggregations/special_single_bucket.rb
Instance Attribute Summary collapse
-
#specification ⇒ Object
Returns the value of attribute specification.
Attributes inherited from Bucket
Attributes inherited from Aggregation
Instance Method Summary collapse
- #as_elastic_aggregation ⇒ Object
-
#initialize(name, specification, aggs) ⇒ SpecialSingleBucket
constructor
A new instance of SpecialSingleBucket.
Methods inherited from Aggregation
#as_elastic, #nested, #reverse_nested
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #hash, #read_option!
Methods included from Arelastic::Arities::Binary
Methods included from Arelastic::Arities::Polyadic
Methods included from Arelastic::Arities::Unary
Constructor Details
#initialize(name, specification, aggs) ⇒ SpecialSingleBucket
Returns a new instance of SpecialSingleBucket.
6 7 8 9 |
# File 'lib/arelastic/aggregations/special_single_bucket.rb', line 6 def initialize(name, specification, aggs) super name, aggs: aggs @specification = specification end |
Instance Attribute Details
#specification ⇒ Object
Returns the value of attribute specification.
4 5 6 |
# File 'lib/arelastic/aggregations/special_single_bucket.rb', line 4 def specification @specification end |
Instance Method Details
#as_elastic_aggregation ⇒ Object
11 12 13 |
# File 'lib/arelastic/aggregations/special_single_bucket.rb', line 11 def as_elastic_aggregation { aggregation_name => { specification_key => specification } }.merge(super) end |