Class: Queries::BaseQueryBuilder
- Inherits:
-
QueryBuilder
- Object
- QueryBuilder
- Queries::BaseQueryBuilder
- Defined in:
- lib/queries/base_query_builder.rb
Overview
Wraps a query keyword around the query of the given object
Constant Summary collapse
- NAME =
'query'
Instance Method Summary collapse
-
#initialize(inner_query:) ⇒ BaseQueryBuilder
constructor
A new instance of BaseQueryBuilder.
-
#query ⇒ Hash
Serialized query hash for the object.
Methods inherited from QueryBuilder
Methods included from AttributesReader
Methods included from AbstractQueryBuilder
Constructor Details
#initialize(inner_query:) ⇒ BaseQueryBuilder
Returns a new instance of BaseQueryBuilder.
11 12 13 |
# File 'lib/queries/base_query_builder.rb', line 11 def initialize(inner_query:) @inner_query = inner_query end |
Instance Method Details
#query ⇒ Hash
Returns serialized query hash for the object.
16 17 18 19 |
# File 'lib/queries/base_query_builder.rb', line 16 def query query = { name.intern => inner_query.query } query end |