mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +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
|
||||
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
|
||||
# the same name for a URL, the value of the smallest must be used.
|
||||
def <=>(other)
|
||||
|
|
|
|||
Loading…
Reference in a new issue