Class: ChewyQuery::Builder::Nodes::Exists
- Defined in:
- lib/chewy_query/builder/nodes/exists.rb
Instance Method Summary collapse
- #! ⇒ Object
- #__render__ ⇒ Object
-
#initialize(name, options = {}) ⇒ Exists
constructor
A new instance of Exists.
Methods inherited from Expr
Methods inherited from Base
Constructor Details
#initialize(name, options = {}) ⇒ Exists
Returns a new instance of Exists.
5 6 7 8 |
# File 'lib/chewy_query/builder/nodes/exists.rb', line 5 def initialize(name, = {}) @name = name.to_s = end |
Instance Method Details
#! ⇒ Object
10 11 12 |
# File 'lib/chewy_query/builder/nodes/exists.rb', line 10 def ! Nodes::Missing.new(@name, null_value: true) end |
#__render__ ⇒ Object
14 15 16 |
# File 'lib/chewy_query/builder/nodes/exists.rb', line 14 def __render__ { exists: { field: @name } } end |