Class: BingHelper::Response
- Inherits:
-
Object
- Object
- BingHelper::Response
- Defined in:
- lib/bing-helper/response.rb
Instance Attribute Summary collapse
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #query ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
21 22 23 |
# File 'lib/bing-helper/response.rb', line 21 def initialize(response) @raw_response = response end |
Instance Attribute Details
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
4 5 6 |
# File 'lib/bing-helper/response.rb', line 4 def raw_response @raw_response end |
Instance Method Details
#query ⇒ Object
17 18 19 |
# File 'lib/bing-helper/response.rb', line 17 def query @query ||= raw_response["SearchResponse"]["Query"] end |
#version ⇒ Object
13 14 15 |
# File 'lib/bing-helper/response.rb', line 13 def version @version ||= raw_response["SearchResponse"]["Version"] end |