Parent

Class Index [+]

Quicksearch

Rack::Auth::Digest::Params

Constants

UNQUOTED
(Not documented)

Public Class Methods

dequote(str) click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 14
14:         def self.dequote(str) # From WEBrick::HTTPUtils
15:           ret = (/\A"(.*)"\Z/ =~ str) ? $1 : str.dup
16:           ret.gsub!(/\\(.)/, "\\1")
17:           ret
18:         end
new() click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 24
24:         def initialize
25:           super
26: 
27:           yield self if block_given?
28:         end
parse(str) click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 6
 6:         def self.parse(str)
 7:           split_header_value(str).inject(new) do |header, param|
 8:             k, v = param.split('=', 2)
 9:             header[k] = dequote(v)
10:             header
11:           end
12:         end
split_header_value(str) click to toggle source

(Not documented)

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

Public Instance Methods

[](k) click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 30
30:         def [](k)
31:           super k.to_s
32:         end
[]=(k, v) click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 34
34:         def []=(k, v)
35:           super k.to_s, v.to_s
36:         end
quote(str) click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 47
47:         def quote(str) # From WEBrick::HTTPUtils
48:           '"' << str.gsub(/[\\\"]/o, "\\\1") << '"'
49:         end
to_s() click to toggle source

(Not documented)

    # File lib/rack/auth/digest/params.rb, line 40
40:         def to_s
41:           inject([]) do |parts, (k, v)|
42:             parts << "#{k}=" + (UNQUOTED.include?(k) ? v.to_s : quote(v))
43:             parts
44:           end.join(', ')
45:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.