Class: Elastic::Nodes::Base
Instance Method Summary
collapse
#pick_nodes
Instance Method Details
#==(_node) ⇒ Object
5
6
7
|
# File 'lib/elastic/nodes/base.rb', line 5
def ==(_node)
render == _node.render
end
|
#clone ⇒ Object
17
18
19
|
# File 'lib/elastic/nodes/base.rb', line 17
def clone
self.class.new
end
|
#handle_result(_raw, _formatter) ⇒ Object
25
26
27
|
# File 'lib/elastic/nodes/base.rb', line 25
def handle_result(_raw, _formatter)
_raw
end
|
#render(_options = {}) ⇒ Object
13
14
15
|
# File 'lib/elastic/nodes/base.rb', line 13
def render(_options = {})
raise NotImplementedError, 'render must be implemented by each node'
end
|
#simplify ⇒ Object
21
22
23
|
# File 'lib/elastic/nodes/base.rb', line 21
def simplify
self.class.new
end
|
#traverse(&_block) ⇒ Object
9
10
11
|
# File 'lib/elastic/nodes/base.rb', line 9
def traverse(&_block)
_block.call(self)
end
|