Class: Eson::Search::SpanOr
- Inherits:
-
Object
- Object
- Eson::Search::SpanOr
- Includes:
- Query
- Defined in:
- lib/eson/search/span_or.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #clauses(&block) ⇒ Object
-
#initialize(options = {}) ⇒ SpanOr
constructor
A new instance of SpanOr.
-
#span_or { ... } ⇒ self
Generates a ‘span_or` query in a query context.
- #to_query_hash ⇒ Object
Methods included from Query
Constructor Details
#initialize(options = {}) ⇒ SpanOr
Returns a new instance of SpanOr.
11 12 13 |
# File 'lib/eson/search/span_or.rb', line 11 def initialize( = {}) self. = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Eson::Search::Query
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/eson/search/span_or.rb', line 9 def @options end |
Instance Method Details
#clauses(&block) ⇒ Object
15 16 17 18 |
# File 'lib/eson/search/span_or.rb', line 15 def clauses(&block) @clauses ||= SubQuery.new(args) @clauses.send(context, &block) end |
#span_or { ... } ⇒ self
7 |
# File 'lib/eson/search/span_or.rb', line 7 short_name :span_or |
#to_query_hash ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/eson/search/span_or.rb', line 20 def to_query_hash result = {} result[:clauses] = @clauses.to_query_hash {name => result.merge()} end |