base.rb
425 Bytes
# frozen_string_literal: true
module Appdocks
module Api
class Base
def success?
response && response[:status].to_i == 1
end
def error_code
response && response[:error]
end
def error_message
response && response[:message]
end
def errors
response && response[:errors]
end
private
attr_reader :response
end
end
end