to_s()
public
Convert the Cookie to its string representation.
Show source
def to_s
buf = ""
buf += @name + '='
buf += @value.map { |v| CGI::escape(v) }.join("&")
if @domain
buf += '; domain=' + @domain
end
if @path
buf += '; path=' + @path
end
if @expires
buf += '; expires=' + CGI::rfc1123_date(@expires)
end
if @secure == true
buf += '; secure'
end
buf
end