Class: OpenFdaApi::QueryInputs
- Inherits:
-
Object
- Object
- OpenFdaApi::QueryInputs
- Defined in:
- lib/open_fda_api/query_inputs.rb
Overview
Group of inputs to build the query against the API with
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#search ⇒ Object
readonly
Returns the value of attribute search.
-
#skip ⇒ Object
readonly
Returns the value of attribute skip.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
Instance Method Summary collapse
-
#initialize(**params) ⇒ QueryInputs
constructor
A new instance of QueryInputs.
Constructor Details
#initialize(**params) ⇒ QueryInputs
Returns a new instance of QueryInputs.
8 9 10 11 12 13 14 15 |
# File 'lib/open_fda_api/query_inputs.rb', line 8 def initialize(**params) @search = params[:search] || [] @sort = params[:sort] || [] @count = params[:count] || [] @skip = params[:skip] || 0 @limit = params[:limit] || nil @api_key = params[:api_key] || nil end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/open_fda_api/query_inputs.rb', line 6 def api_key @api_key end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
6 7 8 |
# File 'lib/open_fda_api/query_inputs.rb', line 6 def count @count end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
6 7 8 |
# File 'lib/open_fda_api/query_inputs.rb', line 6 def limit @limit end |
#search ⇒ Object (readonly)
Returns the value of attribute search.
6 7 8 |
# File 'lib/open_fda_api/query_inputs.rb', line 6 def search @search end |
#skip ⇒ Object (readonly)
Returns the value of attribute skip.
6 7 8 |
# File 'lib/open_fda_api/query_inputs.rb', line 6 def skip @skip end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
6 7 8 |
# File 'lib/open_fda_api/query_inputs.rb', line 6 def sort @sort end |