Class: Qa::Authorities::WebServiceBase

Inherits:
Object
  • Object
show all
Defined in:
lib/qa/authorities/web_service_base.rb

Direct Known Subclasses

Loc

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#raw_responseObject

Returns the value of attribute raw_response.



6
7
8
# File 'lib/qa/authorities/web_service_base.rb', line 6

def raw_response
  @raw_response
end

#responseObject

Returns the value of attribute response.



6
7
8
# File 'lib/qa/authorities/web_service_base.rb', line 6

def response
  @response
end

Instance Method Details

#get_json(url) ⇒ Object

mix-in to retreive and parse JSON content from the web



9
10
11
12
# File 'lib/qa/authorities/web_service_base.rb', line 9

def get_json(url)
  r = RestClient.get url, {accept: :json}
  self.response = JSON.parse(r)
end

#resultsObject

This method should be removed use #response instead



16
17
18
# File 'lib/qa/authorities/web_service_base.rb', line 16

def results
  self.response
end