module GroupDocs::Api::Helpers::Status

Private Instance Methods

parse_status(status) click to toggle source

Converts status from/to human-readable format.

@param [String, Symbol] status @return [Symbol, String] @raise [ArgumentError] if argument is not symbol/string @api private

# File lib/groupdocs/api/helpers/status_helper.rb, line 16
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