Class: Arelastic::Nodes::HashGroup
- Defined in:
- lib/arelastic/nodes/hash_group.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
Returns the value of attribute nodes.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(nodes) ⇒ HashGroup
constructor
A new instance of HashGroup.
Methods inherited from Node
#==, #convert_to_elastic, #hash, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(nodes) ⇒ HashGroup
Returns a new instance of HashGroup.
5 6 7 |
# File 'lib/arelastic/nodes/hash_group.rb', line 5 def initialize nodes @nodes = nodes end |
Instance Attribute Details
#nodes ⇒ Object
Returns the value of attribute nodes.
4 5 6 |
# File 'lib/arelastic/nodes/hash_group.rb', line 4 def nodes @nodes end |
Instance Method Details
#as_elastic ⇒ Object
9 10 11 12 13 |
# File 'lib/arelastic/nodes/hash_group.rb', line 9 def as_elastic nodes.each_with_object({}) do |node, result| result.merge! convert_to_elastic(node) end end |