Class: Jigsaw::Request
- Inherits:
-
Object
- Object
- Jigsaw::Request
- Includes:
- HTTParty
- Defined in:
- lib/jigsaw/request.rb
Constant Summary collapse
- SEARCH_COMPANY_URL =
'http://www.jigsaw.com/rest/searchCompany.json'
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url, options) ⇒ Request
constructor
A new instance of Request.
- #parsed_response ⇒ Object
Constructor Details
#initialize(url, options) ⇒ Request
Returns a new instance of Request.
19 20 21 |
# File 'lib/jigsaw/request.rb', line 19 def initialize(url, ) @response = self.class.get(url, :query => ) end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/jigsaw/request.rb', line 7 def response @response end |
Class Method Details
.search_company(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/jigsaw/request.rb', line 14 def self.search_company( = {}) request = new(SEARCH_COMPANY_URL, ) request.parsed_response end |
Instance Method Details
#parsed_response ⇒ Object
23 24 25 |
# File 'lib/jigsaw/request.rb', line 23 def parsed_response @response.parsed_response end |