Method: Web2Go::CGIResponse#add_cookie

Defined in:
lib/Web2Go/CGIResponse.rb


56
57
58
59
60
61
62
# File 'lib/Web2Go/CGIResponse.rb', line 56

def add_cookie(name,value,domain=nil,path=nil,expires=nil)
  cookie = CGI::Cookie.new(name,value)
  cookie.expires = expires unless expires.nil?
  cookie.domain  = domain unless domain.nil?
  cookie.path    = path unless path.nil?
  set_cookie(cookie)
end