Class: Eson::Search::SpanFirst
- Inherits:
-
Object
- Object
- Eson::Search::SpanFirst
- Defined in:
- lib/eson/search/span_first.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Attributes included from Queries
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SpanFirst
constructor
A new instance of SpanFirst.
-
#span_first { ... } ⇒ self
Generates a ‘span_first` query in a query context.
- #to_query_hash ⇒ Object
Methods included from Queries
Methods included from Query
Constructor Details
#initialize(options = {}) ⇒ SpanFirst
Returns a new instance of SpanFirst.
13 14 15 |
# File 'lib/eson/search/span_first.rb', line 13 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.
11 12 13 |
# File 'lib/eson/search/span_first.rb', line 11 def @options end |
Instance Method Details
#span_first { ... } ⇒ self
9 |
# File 'lib/eson/search/span_first.rb', line 9 short_name :span_first |
#to_query_hash ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/eson/search/span_first.rb', line 17 def to_query_hash result = {} result[:match] = queries.to_query_hash {name => result.merge()} end |