Class: Elastic::Results::BucketCollection

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/elastic/results/bucket_collection.rb

Instance Method Summary collapse

Methods inherited from Base

#as_value

Methods included from Support::Traversable

#pick_nodes

Constructor Details

#initialize(_buckets) ⇒ BucketCollection

Returns a new instance of BucketCollection.



8
9
10
# File 'lib/elastic/results/bucket_collection.rb', line 8

def initialize(_buckets)
  @buckets = _buckets
end

Instance Method Details

#traverse(&_block) ⇒ Object



12
13
14
15
# File 'lib/elastic/results/bucket_collection.rb', line 12

def traverse(&_block)
  super
  @buckets.each { |b| b.traverse(&_block) }
end