class Terrestrial::Web::Response

Public Class Methods

new(http_response) click to toggle source
# File lib/terrestrial/web/response.rb, line 4
def initialize(http_response)
  @inner_response = http_response
end

Public Instance Methods

body() click to toggle source
# File lib/terrestrial/web/response.rb, line 12
def body
  JSON.parse(@inner_response.body)
end
success?() click to toggle source
# File lib/terrestrial/web/response.rb, line 8
def success?
  @inner_response.code.to_s.start_with?("2")
end