Class: Qa::Authorities::WebServiceBase
- Defined in:
- lib/qa/authorities/web_service_base.rb
Instance Attribute Summary collapse
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
Attributes inherited from Base
Instance Method Summary collapse
-
#get_json(url) ⇒ Object
mix-in to retreive and parse JSON content from the web.
Methods inherited from Base
#all, #find, #full_record, #initialize, #sub_authorities
Constructor Details
This class inherits a constructor from Qa::Authorities::Base
Instance Attribute Details
#raw_response ⇒ Object
Returns the value of attribute raw_response.
5 6 7 |
# File 'lib/qa/authorities/web_service_base.rb', line 5 def raw_response @raw_response end |
Instance Method Details
#get_json(url) ⇒ Object
mix-in to retreive and parse JSON content from the web
8 9 10 11 |
# File 'lib/qa/authorities/web_service_base.rb', line 8 def get_json(url) r = RestClient.get url, {accept: :json} JSON.parse(r) end |