class Apnotic::Response
Attributes
headers[R]
Public Class Methods
new(options={})
click to toggle source
# File lib/apnotic/response.rb, line 8 def initialize(options={}) @headers = options[:headers] @body = options[:body] end
Public Instance Methods
body()
click to toggle source
# File lib/apnotic/response.rb, line 21 def body JSON.parse(@body) rescue @body end
ok?()
click to toggle source
# File lib/apnotic/response.rb, line 17 def ok? status == '200' end
status()
click to toggle source
# File lib/apnotic/response.rb, line 13 def status @headers[':status'] if @headers end