diff --git a/lib/http/cookie.rb b/lib/http/cookie.rb index 97c1342..8ea7a8a 100644 --- a/lib/http/cookie.rb +++ b/lib/http/cookie.rb @@ -95,8 +95,8 @@ class HTTP::Cookie # The cookie domain. # # Setting a domain with a leading dot implies that the #for_domain - # flag should be turned on. The setter accepts a `DomainName` - # object as well as a string-like. + # flag should be turned on. The setter accepts a DomainName object + # as well as a string-like. # # :attr_accessor: domain @@ -147,8 +147,8 @@ class HTTP::Cookie # string, downcased or not. # # This methods accepts any attribute name for which a setter method - # is defined. Beware, however, any error (typically - # `ArgumentError`) a setter method raises will be passed through. + # is defined. Beware, however, any error (typically ArgumentError) + # a setter method raises will be passed through. # # e.g. # @@ -256,23 +256,22 @@ class HTTP::Cookie # # ### Compatibility Note for Mechanize::Cookie users # - # * Order of parameters changed in - # `HTTP::Cookie.parse`. Compare these: + # * Order of parameters changed in HTTP::Cookie.parse: # # Mechanize::Cookie.parse(uri, set_cookie[, log]) # # HTTP::Cookie.parse(set_cookie, uri[, :logger => # log]) # - # * `HTTP::Cookie.parse` does not accept nil for `set_cookie`. + # * HTTP::Cookie.parse does not accept nil for `set_cookie`. # - # * `HTTP::Cookie.parse` does not yield nil nor include nil in an + # * HTTP::Cookie.parse does not yield nil nor include nil in an # returned array. It simply ignores unparsable parts. # - # * `HTTP::Cookie.parse` is made to follow RFC 6265 to the extent + # * HTTP::Cookie.parse is made to follow RFC 6265 to the extent # not terribly breaking interoperability with broken # implementations. In particular, it is capable of parsing - # cookie definitions containing double-quotes just as - # naturally expected. + # cookie definitions containing double-quotes just as naturally + # expected. def parse(set_cookie, origin, options = nil, &block) if options logger = options[:logger] diff --git a/lib/http/cookie_jar.rb b/lib/http/cookie_jar.rb index 390ec87..b08b0f1 100644 --- a/lib/http/cookie_jar.rb +++ b/lib/http/cookie_jar.rb @@ -19,13 +19,13 @@ class HTTP::CookieJar # : The store class that backs this jar. (default: `:hash`) # A symbol or an instance of a store class is accepted. Symbols are # mapped to store classes, like `:hash` to - # `HTTP::CookieJar::HashStore` and `:mozilla` to - # `HTTP::CookieJar::MozillaStore`. + # HTTP::CookieJar::HashStore and `:mozilla` to + # HTTP::CookieJar::MozillaStore. # # Any options given are passed through to the initializer of the # specified store class. For example, the `:mozilla` - # (`HTTP::CookieJar::MozillaStore`) store class requires a - # `:filename` option. See individual store classes for details. + # (HTTP::CookieJar::MozillaStore) store class requires a `:filename` + # option. See individual store classes for details. def initialize(options = nil) opthash = { :store => :hash, @@ -57,8 +57,6 @@ class HTTP::CookieJar # To be more specific, HTTP::Cookie.new takes an `:origin` option # and HTTP::Cookie.parse takes one via the second argument. # - # `HTTP::Cookie.parse`. Compare these: - # # # Mechanize::Cookie # jar.add(origin, cookie) # jar.add!(cookie) # no acceptance check is performed @@ -151,20 +149,22 @@ class HTTP::CookieJar # Available option keywords are below: # # * `:format` - #
- #
:yaml
- #
YAML structure (default)
- #
:cookiestxt
- #
: Mozilla's cookies.txt format
- #
+ # + #
+ #
:yaml
+ #
YAML structure (default)
+ #
:cookiestxt
+ #
: Mozilla's cookies.txt format
+ #
# # * `:session` - #
- #
true
- #
Save session cookies as well.
- #
false
- #
Do not save session cookies. (default)
- #
+ # + #
+ #
true
+ #
Save session cookies as well.
+ #
false
+ #
Do not save session cookies. (default)
+ #
# # All options given are passed through to the underlying cookie # saver module. @@ -212,17 +212,18 @@ class HTTP::CookieJar # # Loads cookies recorded in a file or an IO in the format specified # into the jar and returns self. If a given object responds to - # #read it is taken as an IO, or taken as a filename otherwise. + # \#read it is taken as an IO, or taken as a filename otherwise. # # Available option keywords are below: # # * `:format` - #
- #
:yaml
- #
YAML structure (default)
- #
:cookiestxt
- #
: Mozilla's cookies.txt format
- #
+ # + #
+ #
:yaml
+ #
YAML structure (default)
+ #
:cookiestxt
+ #
Mozilla's cookies.txt format
+ #
# # All options given are passed through to the underlying cookie # saver module.