Sha256: 6c5c90148e5b750e99babca6b7d911b4a73f9f4c7880f3daeeb5b72cd8bc56cc

Contents?: true

Size: 808 Bytes

Versions: 1

Compression:

Stored size: 808 Bytes

Contents

class Response
  # HTTP response status code with text
  class Status
    include Adamantium, Concord.new(:code, :text)

    private_class_method :new

    OK                    = new(200, 'OK')
    CREATED               = new(201, 'Created')
    NOT_FOUND             = new(404, 'Not Found')
    NOT_MODIFIED          = new(304, 'Not Modified')
    FOUND                 = new(302, 'Found')
    MOVED_PERMANENTLY     = new(301, 'Moved Permanently')
    BAD_REQUEST           = new(400, 'Bad Request')
    NOT_AUTHORIZED        = new(401, 'Not Authorized')
    FORBIDDEN             = new(403, 'Forbidden')
    INTERNAL_SERVER_ERROR = new(500, 'Internal Server Error')

    # Return status code
    #
    # @return [Fixnum]
    #
    # @api private
    #
    attr_reader :code

  end # Status
end # Response

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
response-0.0.5 lib/response/status.rb