class Sentimeta::RestClient::ApiResponse
Attributes
body[RW]
status[RW]
Public Class Methods
new(response)
click to toggle source
# File lib/sentimeta/rest_client.rb, line 16 def initialize response self.status = response.code self.body = JSON.parse(response) rescue nil end
Public Instance Methods
[](key)
click to toggle source
# File lib/sentimeta/rest_client.rb, line 25 def [] key body[key] if body.respond_to?(:[]) end
ok?()
click to toggle source
# File lib/sentimeta/rest_client.rb, line 21 def ok? status < 300 end