Improve markups.

This commit is contained in:
Akinori MUSHA 2013-04-08 00:03:04 +09:00
parent 865ca54c20
commit f0eb5d0cd8
2 changed files with 36 additions and 36 deletions

View file

@ -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]

View file

@ -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`
# <dl class="rdoc-list note-list">
# <dt>:yaml</dt>
# <dd>YAML structure (default)</dd>
# <dt>:cookiestxt</dt>
# <dd>: Mozilla's cookies.txt format</dd>
# </dl>
#
# <dl class="rdoc-list note-list">
# <dt>:yaml</dt>
# <dd>YAML structure (default)</dd>
# <dt>:cookiestxt</dt>
# <dd>: Mozilla's cookies.txt format</dd>
# </dl>
#
# * `:session`
# <dl class="rdoc-list note-list">
# <dt>true</dt>
# <dd>Save session cookies as well.</dd>
# <dt>false</dt>
# <dd>Do not save session cookies. (default)</dd>
# </dl>
#
# <dl class="rdoc-list note-list">
# <dt>true</dt>
# <dd>Save session cookies as well.</dd>
# <dt>false</dt>
# <dd>Do not save session cookies. (default)</dd>
# </dl>
#
# 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`
# <dl class="rdoc-list note-list">
# <dt>:yaml</dt>
# <dd>YAML structure (default)</dd>
# <dt>:cookiestxt</dt>
# <dd>: Mozilla's cookies.txt format</dd>
# </dl>
#
# <dl class="rdoc-list note-list">
# <dt>:yaml</dt>
# <dd>YAML structure (default)</dd>
# <dt>:cookiestxt</dt>
# <dd>Mozilla's cookies.txt format</dd>
# </dl>
#
# All options given are passed through to the underlying cookie
# saver module.