Class Rufus::Verbs::CookieKey

  1. lib/rufus/verbs/cookies.rb
Parent: Object

Cookies are stored by domain, they via this CookieKey which gathers path and name of the cookie.

Methods

public class

  1. new

public instance

  1. <=>
  2. ==
  3. eql?
  4. hash

Attributes

name [R]
path [R]

Public class methods

new (path, cookie)
[show source]
     # File lib/rufus/verbs/cookies.rb, line 195
195:     def initialize (path, cookie)
196: 
197:       @name = cookie.name
198:       @path = path || cookie.path
199:     end

Public instance methods

<=> (other)

longer paths first

[show source]
     # File lib/rufus/verbs/cookies.rb, line 204
204:     def <=> (other)
205: 
206:       -1 * (@path <=> other.path)
207:     end
== (other)
[show source]
     # File lib/rufus/verbs/cookies.rb, line 213
213:     def == (other)
214:       (@path == other.path and @name == other.name)
215:     end
eql? (other)

Alias for #==

hash ()
[show source]
     # File lib/rufus/verbs/cookies.rb, line 209
209:     def hash
210:       "#{@name}|#{@path}".hash
211:     end