class Rack::Downtime::Strategy::Env

Attributes

named[W]

Public Class Methods

named() click to toggle source
# File lib/rack/downtime/strategy.rb, line 34
def named
  @named ||= "RACK_DOWNTIME"
end
new(named = nil) click to toggle source
# File lib/rack/downtime/strategy.rb, line 39
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 43
def call(env)
  Rack::Downtime::Utils.parse_downtime(env[@named])
end