Sha256: 2f6888b7edc000318c2de86c04dffd1c705f33985f89b9a61c58377c8fde460a

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

module GroupDocs
  module Api
    module Helpers
      module Credentials

        private

        #
        # Returns client ID from access hash or GroupDocs class variable.
        #
        # @return [String]
        # @raise [NoClientIdError] If Client ID hasn't been set yet, raise exception.
        # @api private
        #
        def client_id
          client_id = options[:access][:client_id] || GroupDocs.client_id
          client_id or raise NoClientIdError, 'Client ID has not been specified.'
        end

        #
        # Returns private key from access hash or GroupDocs class variable.
        #
        # @return [String]
        # @raise [NoPrivateKeyError] If private key hasn't been set yet, raise exception.
        # @api private
        #
        def private_key
          private_key = options[:access][:private_key] || GroupDocs.private_key
          private_key or raise NoPrivateKeyError, 'Private Key has not been specified.'
        end

      end # Credentials
    end # Helpers
  end # Api
end # GroupDocs

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
groupdocs-2.3.0 lib/groupdocs/api/helpers/credentials_helper.rb