Class: Mopidy::Response
- Inherits:
-
Object
- Object
- Mopidy::Response
- Defined in:
- lib/mopidy/response.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
3 4 5 |
# File 'lib/mopidy/response.rb', line 3 def initialize(response) @response = response end |
Instance Method Details
#body ⇒ Object
11 12 13 |
# File 'lib/mopidy/response.rb', line 11 def body has_error?(@response) ? parse_error(@response) : parse_response(@response) end |
#status ⇒ Object
7 8 9 |
# File 'lib/mopidy/response.rb', line 7 def status @response.code end |