This project is closed and read-only.
Backport #229 ยป cgi_cookie.patch
| lib/cgi.rb (Arbeitskopie) | ||
|---|---|---|
|
super(@value)
|
||
|
end
|
||
|
attr_accessor("name", "value", "path", "domain", "expires")
|
||
|
attr_reader("secure")
|
||
|
attr_accessor("name", "path", "domain", "expires")
|
||
|
attr_reader("secure", "value")
|
||
|
# Set whether the Cookie is a secure cookie or not.
|
||
|
#
|
||
| ... | ... | |
|
@secure = val if val == true or val == false
|
||
|
@secure
|
||
|
end
|
||
|
|
||
|
def value=(val)
|
||
|
@value.replace(Array(val))
|
||
|
end
|
||
|
# Convert the Cookie to its string representation.
|
||
|
def to_s
|
||
|
buf = ""
|
||
|
buf += @name + '='
|
||
|
if @value.kind_of?(String)
|
||
|
buf += CGI::escape(@value)
|
||
|
else
|
||
|
buf += @value.collect{|v| CGI::escape(v) }.join("&")
|
||
|
end
|
||
|
buf += @value.map { |v| CGI::escape(v) }.join("&")
|
||
|
if @domain
|
||
|
buf += '; domain=' + @domain
|
||