Class Mechanize::CookieJar
In: lib/mechanize/cookie_jar.rb
Parent: Object

This class is used to manage the Cookies that have been returned from any particular website.

Methods

<<   add   add!   cleanup   clear!   cookies   dump_cookiestxt   each   empty?   load   load_cookiestxt   new   save_as  

Included Modules

Enumerable

Attributes

jar  [R]  add_cookie wants something resembling a URI.

Public Class methods

Public Instance methods

<<(cookie)

Alias for add!

Add a cookie to the jar if it is considered acceptable from uri. Return nil if the cookie was not added, otherwise return the cookie added.

Add a cookie to the jar and return self.

Clear the cookie jar

Fetch the cookies that should be used for the URI object passed in.

Write cookies to Mozilla cookies.txt-style IO stream

Load cookie jar from a file in the format specified.

Available formats: :yaml <- YAML structure. :cookiestxt <- Mozilla‘s cookies.txt format

Read cookies from Mozilla cookies.txt-style IO stream

Save the cookie jar to a file in the format specified.

Available formats: :yaml <- YAML structure :cookiestxt <- Mozilla‘s cookies.txt format

Protected Instance methods

[Validate]