Class: Echonest::Response
- Inherits:
-
Object
- Object
- Echonest::Response
- Defined in:
- lib/echonest/response.rb
Defined Under Namespace
Classes: Status
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(body) ⇒ Response
constructor
A new instance of Response.
- #status ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(body) ⇒ Response
Returns a new instance of Response.
8 9 10 |
# File 'lib/echonest/response.rb', line 8 def initialize(body) @json = Hashie::Mash.new(JSON.parse(body)) end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
6 7 8 |
# File 'lib/echonest/response.rb', line 6 def json @json end |