class NftmakerApi::Response
Attributes
original[R]
original_response[R]
Public Class Methods
new(response)
click to toggle source
# File lib/nftmaker_api/response.rb, line 8 def initialize(response) @original_response = response end
Public Instance Methods
error()
click to toggle source
# File lib/nftmaker_api/response.rb, line 25 def error @error ||= success? ? nil : Error.new(self) end
error?()
click to toggle source
# File lib/nftmaker_api/response.rb, line 21 def error? !success? end
parsed()
click to toggle source
# File lib/nftmaker_api/response.rb, line 12 def parsed @parsed = Oj.load(@original_response.body) || {} end
Also aliased as: to_h
success?()
click to toggle source
# File lib/nftmaker_api/response.rb, line 17 def success? @original_response.status == 200 end