Class: Rack::Auth::Digest::Params

### Home Classes Methods

### In Files

- lib/rack/auth/digest/params.rb

### Parent

Hash

### Methods

- ::dequote
- ::new
- ::parse
- ::split_header_value
- #[]
- #[]=
- #quote
- #to_s

### Files

- KNOWN-ISSUES

### Class/Module Index

Quicksearch

- Rack
- Rack::Auth
- Rack::Auth::AbstractHandler
- Rack::Auth::AbstractRequest
- Rack::Auth::Basic
- Rack::Auth::Basic::Request
- Rack::Auth::Digest
- Rack::Auth::Digest::MD5
- Rack::Auth::Digest::Nonce
- Rack::Auth::Digest::Params
- Rack::Auth::Digest::Request
- Rack::BodyProxy
- Rack::Builder
- Rack::Cascade
- Rack::Chunked
- Rack::Chunked::Body
- Rack::CommonLogger
- Rack::ConditionalGet
- Rack::Config
- Rack::ContentLength
- Rack::ContentType
- Rack::Deflater
- Rack::Deflater::DeflateStream
- Rack::Deflater::GzipStream
- Rack::Directory
- Rack::ETag
- Rack::File
- Rack::ForwardRequest
- Rack::Handler
- Rack::Handler::CGI
- Rack::Handler::EventedMongrel
- Rack::Handler::FastCGI
- Rack::Handler::LSWS
- Rack::Handler::Mongrel
- Rack::Handler::SCGI
- Rack::Handler::SwiftipliedMongrel
- Rack::Handler::Thin
- Rack::Handler::WEBrick
- Rack::Head
- Rack::Lint
- Rack::Lobster
- Rack::Lock
- Rack::Logger
- Rack::MethodOverride
- Rack::Mime
- Rack::MockRequest
- Rack::MockRequest::FatalWarner
- Rack::MockRequest::FatalWarning
- Rack::MockResponse
- Rack::Multipart
- Rack::Multipart::Generator
- Rack::Multipart::MultipartLimitError
- Rack::Multipart::Parser
- Rack::Multipart::UploadedFile
- Rack::NullLogger
- Rack::Recursive
- Rack::Reloader
- Rack::Reloader::Stat
- Rack::Request
- Rack::Response
- Rack::Response::Helpers
- Rack::RewindableInput
- Rack::RewindableInput::Tempfile
- Rack::Runtime
- Rack::Sendfile
- Rack::Server
- Rack::Server::Options
- Rack::Session
- Rack::Session::Abstract
- Rack::Session::Abstract::ID
- Rack::Session::Abstract::SessionHash
- Rack::Session::Cookie
- Rack::Session::Cookie::Base64
- Rack::Session::Cookie::Base64::JSON
- Rack::Session::Cookie::Base64::Marshal
- Rack::Session::Cookie::Identity
- Rack::Session::Cookie::Reverse
- Rack::Session::Memcache
- Rack::Session::Pool
- Rack::ShowExceptions
- Rack::ShowStatus
- Rack::Static
- Rack::URLMap
- Rack::Utils
- Rack::Utils::Context
- Rack::Utils::HeaderHash
- Rack::Utils::KeySpaceConstrainedParams
- Rack::Utils::Multipart
- Rack::Utils::OkJson
- Rack::Utils::OkJson::Error
- Rack::Utils::OkJson::Utf8Error
- FCGI
- FCGI::Stream
- Object

No matching classes.

# Rack::Auth::Digest::Params

### Constants

UNQUOTED

### Public Class Methods

dequote(str) click to toggle source

    # File lib/rack/auth/digest/params.rb, line 13
    def self.dequote(str) # From WEBrick::HTTPUtils
      ret = (/\A"(.*)"\Z/ =~ str) ? $1 : str.dup
      ret.gsub!(/\\(.)/, "\\1")
      ret
    end

new() click to toggle source

    # File lib/rack/auth/digest/params.rb, line 23
    def initialize
      super()

      yield self if block_given?
    end

parse(str) click to toggle source

    # File lib/rack/auth/digest/params.rb, line 6
    def self.parse(str)
      Params[*split_header_value(str).map do |param|
        k, v = param.split('=', 2)
        [k, dequote(v)]
      end.flatten]
    end

split_header_value(str) click to toggle source

    # File lib/rack/auth/digest/params.rb, line 19
    def self.split_header_value(str)
      str.scan( /(\w+\=(?:"[^\"]+"|[^,]+))/ ).collect{ |v| v[0] }
    end

### Public Instance Methods

[](k) click to toggle source

    # File lib/rack/auth/digest/params.rb, line 29
    def [](k)
      super k.to_s
    end

[]=(k, v) click to toggle source

    # File lib/rack/auth/digest/params.rb, line 33
    def []=(k, v)
      super k.to_s, v.to_s
    end

quote(str) click to toggle source

    # File lib/rack/auth/digest/params.rb, line 45
    def quote(str) # From WEBrick::HTTPUtils
      '"' << str.gsub(/[\\\"]/, "\\\11"") << '"'
    end

to_s() click to toggle source

    # File lib/rack/auth/digest/params.rb, line 39
    def to_s
      map do |k, v|
        "#{k}=" + (UNQUOTED.include?(k) ? v.to_s : quote(v))
      end.join(', ')
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.