class NRB::HTTPService::Response

Attributes

body[R]
headers[R]
status[R]

Public Class Methods

new(args) click to toggle source
# File lib/NRB_http_service/response.rb, line 14
def initialize(args)
  @status = args[:status]
  @body = args[:body]
  @headers = args[:headers]
end

Public Instance Methods

errored?() click to toggle source
# File lib/NRB_http_service/response.rb, line 9
def errored?
  ! success?
end
success?() click to toggle source
# File lib/NRB_http_service/response.rb, line 21
def success?
  status >= 200 && status < 300
end