Class: TransparentData::Response::Struct
- Inherits:
-
Object
- Object
- TransparentData::Response::Struct
- Extended by:
- Forwardable
- Defined in:
- lib/transparent_data/response/struct.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ Struct
constructor
A new instance of Struct.
Constructor Details
#initialize(response) ⇒ Struct
Returns a new instance of Struct.
8 9 10 |
# File 'lib/transparent_data/response/struct.rb', line 8 def initialize(response) @response = response end |
Instance Method Details
#body ⇒ Object
12 13 14 15 16 |
# File 'lib/transparent_data/response/struct.rb', line 12 def body JSON.parse(@response.body) rescue JSON::ParserError @response.body end |