Class: Eson::Search::Nested
- Inherits:
-
Object
- Object
- Eson::Search::Nested
- Includes:
- Query, QueryGroup
- Defined in:
- lib/eson/search/nested.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Attributes included from Parametrized
Attributes included from Queries
Attributes included from Filters
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Nested
constructor
A new instance of Nested.
-
#nested { ... } ⇒ self
Generates a ‘nested` query in a query context.
- #to_query_hash ⇒ Object
Methods included from QueryGroup
Methods included from Parametrized
Methods included from Queries
Methods included from Filters
Methods included from Query
Constructor Details
#initialize(options = {}) ⇒ Nested
Returns a new instance of Nested.
12 13 14 15 |
# File 'lib/eson/search/nested.rb', line 12 def initialize( = {}) self. = instance_exec(self, &Proc.new) if block_given? 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.
10 11 12 |
# File 'lib/eson/search/nested.rb', line 10 def @options end |
Instance Method Details
#nested { ... } ⇒ self
8 |
# File 'lib/eson/search/nested.rb', line 8 short_name :nested |
#to_query_hash ⇒ Object
17 18 19 20 21 |
# File 'lib/eson/search/nested.rb', line 17 def to_query_hash { name => {:query => super}.merge() } end |