class Rbvore::API::Response
Attributes
original[R]
Public Class Methods
new(obj)
click to toggle source
# File lib/rbvore/api.rb, line 33 def initialize(obj) @original = obj end
Public Instance Methods
error()
click to toggle source
# File lib/rbvore/api.rb, line 45 def error API::Error.new(response: self) unless success? end
json_body()
click to toggle source
# File lib/rbvore/api.rb, line 37 def json_body @json_body ||= JSON.parse(body) end
success?()
click to toggle source
# File lib/rbvore/api.rb, line 41 def success? original.is_a?(Net::HTTPSuccess) end