Class: Sendle::Api::Responses::Json
- Inherits:
-
Object
- Object
- Sendle::Api::Responses::Json
- Defined in:
- lib/sendle/api/responses/json.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(json_string) ⇒ Json
constructor
A new instance of Json.
Constructor Details
#initialize(json_string) ⇒ Json
Returns a new instance of Json.
7 8 9 10 |
# File 'lib/sendle/api/responses/json.rb', line 7 def initialize(json_string) @raw = json_string @json = JSON.parse(json_string) end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
5 6 7 |
# File 'lib/sendle/api/responses/json.rb', line 5 def json @json end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
5 6 7 |
# File 'lib/sendle/api/responses/json.rb', line 5 def raw @raw end |