class Rack::Downtime::Strategy::Query

Attributes

param[W]

Public Class Methods

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

Public Instance Methods

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