In Mechanize what is the cookiejar and how does it differ from cookies?
How does Mechanize::CookieJar differ from the Mechanize::Cookies array? There must be some difference but after poking around for a little bit I can't seem to find a good explanation?
It seems from the official documentation that the CookieJar and cookies are very similar indeed:
# File lib/mechanize.rb, line 208
def cookies
@cookie_jar.to_a
end
Usually, a Cookie Jar has also the interesting ability to be saved on disk and reloaded later on (see the save_as
and load
method on the Cookie Jar).
精彩评论