Class: Rack::Downtime::Strategy::Header
- Defined in:
- lib/rack/downtime/strategy.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(named = nil) ⇒ Header
constructor
A new instance of Header.
Methods inherited from Env
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
.named ⇒ Object
49 50 51 |
# File 'lib/rack/downtime/strategy.rb', line 49 def self.named @named ||= "X-Downtime" end |