Sign in

EDIT / kanjai · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Network
  • kanjai
  • lib
  • appdocks
  • api
  • base.rb
  • add api contentdock
    30789788
    Andrey Karpikov authored
    2022-02-23 23:26:02 +0100  
    Browse Files »
base.rb 425 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# 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