Parent

Methods

Files

HTTPAuth::Digest::AbstractHeader

Superclass for all the header container classes

Attributes

h[R]

holds directives and values for digest calculation

Public Instance Methods

method_missing(m, *a) click to toggle source

Redirects attribute messages to the internal directives

Example:

class Credentials < AbstractHeader
  def initialize
    @h = { :username => 'Ben' }
  end
end

c = Credentials.new
c.username #=> 'Ben'
c.username = 'Mary'
c.username #=> 'Mary'
# File lib/httpauth/digest.rb, line 259
def method_missing(m, *a)
  if ((m.to_s =~ /^(.*)=$/) == 0) and @h.keys.include?($1.intern)
    @h[$1.intern] = a[0]
  elsif @h.keys.include? m
    @h[m]
  else
    raise NameError.new("undefined method `#{m}' for #{self}")
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.