Class: Arelastic::Nodes::Node
Instance Method Summary
collapse
binary
polyadic
unary
Instance Method Details
#==(other) ⇒ Object
16
17
18
|
# File 'lib/arelastic/nodes/node.rb', line 16
def ==(other)
other.is_a?(Arelastic::Nodes::Node) && as_elastic == other.as_elastic
end
|
#convert_to_elastic(expr) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/arelastic/nodes/node.rb', line 8
def convert_to_elastic(expr)
if expr.is_a?(Array)
expr.map { |e| convert_to_elastic(e) }
else
expr.respond_to?(:as_elastic) ? expr.as_elastic : expr
end
end
|