class SimpleFirebase::Response

Public Class Methods

new(http_response) click to toggle source
# File lib/simple_firebase/response.rb, line 5
def initialize(http_response)
  @http_response = http_response
end

Public Instance Methods

body() click to toggle source
# File lib/simple_firebase/response.rb, line 17
def body
  @http_response.body
end
json_body() click to toggle source
# File lib/simple_firebase/response.rb, line 13
def json_body
  JSON.parse(@http_response.body || 'null')
end
success?() click to toggle source
# File lib/simple_firebase/response.rb, line 9
def success?
  @http_response.code.to_i >= 200 && @http_response.code.to_i < 300
end