Class: ChewyQuery::Builder::Nodes::Query
- Defined in:
- lib/chewy_query/builder/nodes/query.rb
Instance Method Summary collapse
- #__render__ ⇒ Object
-
#initialize(query, options = {}) ⇒ Query
constructor
A new instance of Query.
Methods inherited from Expr
Methods inherited from Base
Constructor Details
#initialize(query, options = {}) ⇒ Query
Returns a new instance of Query.
5 6 7 8 |
# File 'lib/chewy_query/builder/nodes/query.rb', line 5 def initialize(query, = {}) @query = query @options = end |
Instance Method Details
#__render__ ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/chewy_query/builder/nodes/query.rb', line 10 def __render__ if @options.key?(:cache) { fquery: { query: @query, _cache: !!@options[:cache] } } else { query: @query } end end |