mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +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
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
# Gets an array of cookies that should be sent for the URL/URI,
|
# Gets an array of cookies sorted by the path and creation time. If
|
||||||
# updating the access time of each cookie.
|
# `url` is given, only ones that should be sent to the URL/URI are
|
||||||
def cookies(url)
|
# selected, with the access time of each of them updated.
|
||||||
|
def cookies(url = nil)
|
||||||
each(url).sort
|
each(url).sort
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue