Class: XingApi::Response
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- XingApi::Response
- Defined in:
- lib/xing_api/response.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(body, headers) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(body, headers) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/xing_api/response.rb', line 7 def initialize(body, headers) @headers = headers body = begin JSON.parse(body, symbolize_names: true) rescue JSON::ParserError {} end super(body) end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/xing_api/response.rb', line 5 def headers @headers end |