Class: ElasticQuery::QueryWrapper
- Defined in:
- lib/elastic_query/query_wrapper.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Attributes inherited from Query
Instance Method Summary collapse
-
#initialize(key, query) ⇒ QueryWrapper
constructor
A new instance of QueryWrapper.
- #to_hash ⇒ Object
Constructor Details
#initialize(key, query) ⇒ QueryWrapper
Returns a new instance of QueryWrapper.
5 6 7 8 |
# File 'lib/elastic_query/query_wrapper.rb', line 5 def initialize(key, query) @key = key super(query) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/elastic_query/query_wrapper.rb', line 3 def key @key end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 |
# File 'lib/elastic_query/query_wrapper.rb', line 10 def to_hash { key => query.to_hash } end |