Class: Eson::Search::Queries::QueriesArray
- Inherits:
-
Array
- Object
- Array
- Eson::Search::Queries::QueriesArray
- Includes:
- Parametrized, QueryMethods
- Defined in:
- lib/eson/search/queries.rb
Instance Attribute Summary
Attributes included from Parametrized
Instance Method Summary collapse
-
#initialize(args) ⇒ QueriesArray
constructor
A new instance of QueriesArray.
- #queries ⇒ Object
- #to_query_hash ⇒ Object
Methods included from Parametrized
Constructor Details
#initialize(args) ⇒ QueriesArray
Returns a new instance of QueriesArray.
16 17 18 19 |
# File 'lib/eson/search/queries.rb', line 16 def initialize(args) self.args = args instance_exec(self, &Proc.new) if block_given? end |
Instance Method Details
#queries ⇒ Object
12 13 14 |
# File 'lib/eson/search/queries.rb', line 12 def queries self end |
#to_query_hash ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/eson/search/queries.rb', line 21 def to_query_hash if length == 1 first.to_query_hash else map(&:to_query_hash) end end |