Methods
#
D
N
P
Q
S
T
Constants
UNQUOTED = ['nc', 'stale']
 
Class Public methods
dequote(str)
# 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()
# File lib/rack/auth/digest/params.rb, line 23
def initialize
  super()

  yield self if block_given?
end
parse(str)
# 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)
# File lib/rack/auth/digest/params.rb, line 19
def self.split_header_value(str)
  str.scan(/\w+\=(?:"[^\"]+"|[^,]+)/n)
end
Instance Public methods
[](k)
# File lib/rack/auth/digest/params.rb, line 29
def [](k)
  super k.to_s
end
[]=(k, v)
# File lib/rack/auth/digest/params.rb, line 33
def []=(k, v)
  super k.to_s, v.to_s
end
quote(str)
# File lib/rack/auth/digest/params.rb, line 45
def quote(str) # From WEBrick::HTTPUtils
  '"' << str.gsub(/[\\"]/o, "\\\1") << '"'
end
to_s()
# 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