提交 143d047d 编写于 作者: K Kasper Timm Hansen

Add AbstractCookieJar class.

Eventually this will be the superclass of all the chained jars.
上级 ed3d213e
...@@ -412,7 +412,7 @@ def write_cookie?(cookie) ...@@ -412,7 +412,7 @@ def write_cookie?(cookie)
end end
end end
class PermanentCookieJar #:nodoc: class AbstractCookieJar # :nodoc:
include ChainedCookieJars include ChainedCookieJars
def initialize(parent_jar) def initialize(parent_jar)
...@@ -422,7 +422,9 @@ def initialize(parent_jar) ...@@ -422,7 +422,9 @@ def initialize(parent_jar)
def [](name) def [](name)
@parent_jar[name.to_s] @parent_jar[name.to_s]
end end
end
class PermanentCookieJar < AbstractCookieJar # :nodoc:
def []=(name, options) def []=(name, options)
if options.is_a?(Hash) if options.is_a?(Hash)
options.symbolize_keys! options.symbolize_keys!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册