class Cookie::Registry

Models a registry of {Cookie} instances

Constants

Message for {UnknownCookieError}

UnknownCookieError

Raised when trying to {#fetch} an unknown {Cookie}

Public Class Methods

coerce(header) click to toggle source
# File lib/cookie/registry.rb, line 17
def self.coerce(header)
  new(cookie_hash(header))
end
new(entries = EMPTY_HASH) click to toggle source
Calls superclass method
# File lib/cookie/registry.rb, line 30
def initialize(entries = EMPTY_HASH)
  super
end

Private Class Methods

Public Instance Methods

fetch(name) click to toggle source
# File lib/cookie/registry.rb, line 34
def fetch(name)
  get(name) or raise UnknownCookieError, UNKNOWN_COOKIE_MSG % name.inspect
end
get(name) click to toggle source
# File lib/cookie/registry.rb, line 38
def get(name)
  @entries[name]
end