class Rack::Downtime::Strategy::Cookie

Attributes

named[W]

Public Class Methods

named() click to toggle source
# File lib/rack/downtime/strategy.rb, line 13
def named
  @named ||= "__dt__"
end
new(named = nil) click to toggle source
# File lib/rack/downtime/strategy.rb, line 18
def initialize(named = nil)
  @named = named || self.class.named
end

Public Instance Methods

call(env) click to toggle source
# File lib/rack/downtime/strategy.rb, line 22
def call(env)
  req = Rack::Request.new(env)
  Rack::Downtime::Utils.parse_downtime(req.cookies[@named])
  #delete_cookie_header!(env, @named) if downtime
  #downtime
end