Class: Mopidy::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/mopidy/response.rb

Instance Method Summary collapse

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

#bodyObject



11
12
13
# File 'lib/mopidy/response.rb', line 11

def body
  has_error?(@response) ? parse_error(@response) : parse_response(@response)
end

#statusObject



7
8
9
# File 'lib/mopidy/response.rb', line 7

def status
  @response.code
end