Class: DaedalSL::NestedDisMaxQuery
- Inherits:
-
BlockQuery
- Object
- BlockQuery
- DaedalSL::NestedDisMaxQuery
- Defined in:
- lib/daedal-sl/nested_dis_max_query.rb
Instance Attribute Summary
Attributes inherited from BlockQuery
Instance Method Summary collapse
-
#initialize(parent, options) ⇒ NestedDisMaxQuery
constructor
A new instance of NestedDisMaxQuery.
- #query ⇒ Object
Methods inherited from BlockQuery
Constructor Details
#initialize(parent, options) ⇒ NestedDisMaxQuery
Returns a new instance of NestedDisMaxQuery.
4 5 6 7 |
# File 'lib/daedal-sl/nested_dis_max_query.rb', line 4 def initialize(parent, ) @parent = parent @base = Daedal::Queries::NestedQuery.new(.merge(query: Daedal::Queries::DisMaxQuery.new)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class DaedalSL::BlockQuery
Instance Method Details
#query ⇒ Object
9 10 11 12 13 |
# File 'lib/daedal-sl/nested_dis_max_query.rb', line 9 def query if (result = yield) @base.query.queries << result end end |