class Arelastic::Nodes::Node
Public Instance Methods
==(other)
click to toggle source
# File lib/arelastic/nodes/node.rb, line 22 def ==(other) other.is_a?(Arelastic::Nodes::Node) && as_elastic == other.as_elastic end
convert_to_elastic(expr)
click to toggle source
# 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) } elsif expr.is_a?(Hash) expr.transform_values { |e| convert_to_elastic(e) } else expr.respond_to?(:as_elastic) ? expr.as_elastic : expr end end
read_option!(options, key)
click to toggle source
# File lib/arelastic/nodes/node.rb, line 18 def read_option!(options, key) options.delete(key) || options.delete(key.to_sym) end