Class: RequestHandler::QueryParser
- Inherits:
-
SchemaParser
- Object
- SchemaParser
- RequestHandler::QueryParser
- Defined in:
- lib/request_handler/query_parser.rb
Constant Summary collapse
- RESERVED_KEYS =
%w[fields filter include page sort].freeze
Instance Method Summary collapse
-
#initialize(params:, schema:, schema_options: {}) ⇒ QueryParser
constructor
A new instance of QueryParser.
- #run ⇒ Object
Constructor Details
#initialize(params:, schema:, schema_options: {}) ⇒ QueryParser
Returns a new instance of QueryParser.
9 10 11 12 13 |
# File 'lib/request_handler/query_parser.rb', line 9 def initialize(params:, schema:, schema_options: {}) super(schema: schema, schema_options: ) @query = params.dup RESERVED_KEYS.each { |key| query.delete(key) } end |
Instance Method Details
#run ⇒ Object
15 16 17 |
# File 'lib/request_handler/query_parser.rb', line 15 def run validate_schema(query) end |