mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
Add inspect.
This commit is contained in:
parent
66f37b20dd
commit
6b6944b324
1 changed files with 7 additions and 0 deletions
|
|
@ -594,6 +594,13 @@ class HTTP::Cookie
|
||||||
string
|
string
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def inspect
|
||||||
|
'#<%s:' % self.class << PERSISTENT_PROPERTIES.map { |key|
|
||||||
|
'%s=%s' % [key, instance_variable_get(:"@#{key}").inspect]
|
||||||
|
}.join(', ') << ' origin=%s>' % [@origin ? @origin.to_s : 'nil']
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
# Compares the cookie with another. When there are many cookies with
|
# Compares the cookie with another. When there are many cookies with
|
||||||
# the same name for a URL, the value of the smallest must be used.
|
# the same name for a URL, the value of the smallest must be used.
|
||||||
def <=>(other)
|
def <=>(other)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue