Class: Committee::Drivers::Driver
- Inherits:
-
Object
- Object
- Committee::Drivers::Driver
- Defined in:
- lib/committee/drivers/driver.rb
Overview
Driver is a base class for driver implementations.
Direct Known Subclasses
Instance Method Summary collapse
-
#default_allow_get_body ⇒ Object
Use GET request body to request parameter (request body merge to parameter).
-
#default_coerce_form_params ⇒ Object
Whether parameters that were form-encoded will be coerced by default.
-
#default_path_params ⇒ Object
Whether parameters in a request’s path will be considered and coerced by default.
-
#default_query_params ⇒ Object
Whether parameters in a request’s query string will be considered and coerced by default.
- #name ⇒ Object
-
#parse(data) ⇒ Object
Parses an API schema and builds a set of route definitions for use with Committee.
- #schema_class ⇒ Object
Instance Method Details
#default_allow_get_body ⇒ Object
Use GET request body to request parameter (request body merge to parameter)
13 14 15 |
# File 'lib/committee/drivers/driver.rb', line 13 def default_allow_get_body raise "needs implementation" end |
#default_coerce_form_params ⇒ Object
Whether parameters that were form-encoded will be coerced by default.
8 9 10 |
# File 'lib/committee/drivers/driver.rb', line 8 def default_coerce_form_params raise "needs implementation" end |
#default_path_params ⇒ Object
Whether parameters in a request’s path will be considered and coerced by default.
19 20 21 |
# File 'lib/committee/drivers/driver.rb', line 19 def default_path_params raise "needs implementation" end |
#default_query_params ⇒ Object
Whether parameters in a request’s query string will be considered and coerced by default.
25 26 27 |
# File 'lib/committee/drivers/driver.rb', line 25 def default_query_params raise "needs implementation" end |
#name ⇒ Object
29 30 31 |
# File 'lib/committee/drivers/driver.rb', line 29 def name raise "needs implementation" end |
#parse(data) ⇒ Object
Parses an API schema and builds a set of route definitions for use with Committee.
The expected input format is a data hash with keys as strings (as opposed to symbols) like the kind produced by JSON.parse or YAML.load.
38 39 40 |
# File 'lib/committee/drivers/driver.rb', line 38 def parse(data) raise "needs implementation" end |
#schema_class ⇒ Object
42 43 44 |
# File 'lib/committee/drivers/driver.rb', line 42 def schema_class raise "needs implementation" end |