class Rocket::Response

Public Class Methods

new(resp, json) click to toggle source
Calls superclass method
# File lib/rocket/response.rb, line 3
def initialize(resp, json)
  super(RecursiveOpenStruct.new(json, :recurse_over_arrays => true))
  @resp = resp
end

Public Instance Methods

client_error?() click to toggle source
# File lib/rocket/response.rb, line 12
def client_error?
  (400..499).include? @resp.code.to_i
end
success?() click to toggle source
# File lib/rocket/response.rb, line 8
def success?
  (200..299).include? @resp.code.to_i
end