Class: OpenFdaApi::QueryInputs

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_keyObject (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

#countObject (readonly)

Returns the value of attribute count.



6
7
8
# File 'lib/open_fda_api/query_inputs.rb', line 6

def count
  @count
end

#limitObject (readonly)

Returns the value of attribute limit.



6
7
8
# File 'lib/open_fda_api/query_inputs.rb', line 6

def limit
  @limit
end

#searchObject (readonly)

Returns the value of attribute search.



6
7
8
# File 'lib/open_fda_api/query_inputs.rb', line 6

def search
  @search
end

#skipObject (readonly)

Returns the value of attribute skip.



6
7
8
# File 'lib/open_fda_api/query_inputs.rb', line 6

def skip
  @skip
end

#sortObject (readonly)

Returns the value of attribute sort.



6
7
8
# File 'lib/open_fda_api/query_inputs.rb', line 6

def sort
  @sort
end