Sha256: 04971fa7f4b308d8b15976074772f7eab43815058f63fe7b455cd9caddb0ce21

Contents?: true

Size: 674 Bytes

Versions: 22

Compression:

Stored size: 674 Bytes

Contents

module GroupDocs
  module Api
    module Helpers
      module Status

        private

        #
        # Converts status from/to human-readable format.
        #
        # @param [String, Symbol] status
        # @return [Symbol, String]
        # @raise [ArgumentError] if argument is not symbol/string
        # @api private
        #
        def parse_status(status)
          case status
          when Symbol then status.to_s.camelize
          when String then status.underscore.to_sym
          else raise ArgumentError, "Expected string/symbol, received: #{status.class}"
          end
        end

      end # Status
    end # Helpers
  end # Api
end # GroupDocs

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
groupdocs-2.2.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-2.1.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-2.0.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.9.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.8.1 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.8.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.7.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.6.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.9 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.8 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.7 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.6 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.5 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.4 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.3 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.2 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.1 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.5.0 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.4.2 lib/groupdocs/api/helpers/status_helper.rb
groupdocs-1.4.1 lib/groupdocs/api/helpers/status_helper.rb