Class: Rack::Downtime::Strategy::Header

Inherits:
Env
  • Object
show all
Defined in:
lib/rack/downtime/strategy.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Env

#call

Constructor Details

#initialize(named = nil) ⇒ Header

Returns a new instance of Header.



53
54
55
56
# File 'lib/rack/downtime/strategy.rb', line 53

def initialize(named = nil)
  @named = (named || self.class.named).upcase.tr!("-", "_")
  @named.prepend "HTTP_" unless @named.start_with?("HTTP_")
end

Class Method Details

.namedObject



49
50
51
# File 'lib/rack/downtime/strategy.rb', line 49

def self.named
  @named ||= "X-Downtime"
end