Class: Elastic::Results::ResultGroup

Inherits:
Base
  • Object
show all
Defined in:
lib/elastic/results/result_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::Traversable

#pick_nodes

Constructor Details

#initialize(_keys, _data) ⇒ ResultGroup

Returns a new instance of ResultGroup.



5
6
7
8
# File 'lib/elastic/results/result_group.rb', line 5

def initialize(_keys, _data)
  @keys = _keys.freeze
  @data = _data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/elastic/results/result_group.rb', line 3

def data
  @data
end

#keysObject (readonly)

Returns the value of attribute keys.



3
4
5
# File 'lib/elastic/results/result_group.rb', line 3

def keys
  @keys
end

Instance Method Details

#as_valueObject



10
11
12
# File 'lib/elastic/results/result_group.rb', line 10

def as_value
  @data.as_value
end

#traverse(&_block) ⇒ Object



14
15
16
17
# File 'lib/elastic/results/result_group.rb', line 14

def traverse(&_block)
  super
  @data.traverse(&_block)
end