Class: Elastic::Nodes::BaseAgg

Inherits:
Base
  • Object
show all
Defined in:
lib/elastic/nodes/base_agg.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #handle_result, #render, #traverse

Methods included from Support::Traversable

#pick_nodes, #traverse

Constructor Details

#initializeBaseAgg

Returns a new instance of BaseAgg.



9
10
11
# File 'lib/elastic/nodes/base_agg.rb', line 9

def initialize
  @name = :default
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/elastic/nodes/base_agg.rb', line 3

def name
  @name
end

Class Method Details

.build(_name) ⇒ Object



5
6
7
# File 'lib/elastic/nodes/base_agg.rb', line 5

def self.build(_name)
  new.tap { |n| n.name = _name }
end

Instance Method Details

#cloneObject



17
18
19
# File 'lib/elastic/nodes/base_agg.rb', line 17

def clone
  copy_name super
end

#simplifyObject



21
22
23
# File 'lib/elastic/nodes/base_agg.rb', line 21

def simplify
  copy_name super
end