mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
CookieJar#cookie(): Allow call without an argument.
This commit is contained in:
parent
53758d0a77
commit
f1fe763007
1 changed files with 4 additions and 3 deletions
|
|
@ -85,9 +85,10 @@ class HTTP::CookieJar
|
|||
self
|
||||
end
|
||||
|
||||
# Gets an array of cookies that should be sent for the URL/URI,
|
||||
# updating the access time of each cookie.
|
||||
def cookies(url)
|
||||
# Gets an array of cookies sorted by the path and creation time. If
|
||||
# `url` is given, only ones that should be sent to the URL/URI are
|
||||
# selected, with the access time of each of them updated.
|
||||
def cookies(url = nil)
|
||||
each(url).sort
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue