Class: Rack::Downtime::Strategy::Query
- Inherits:
-
Object
- Object
- Rack::Downtime::Strategy::Query
- Defined in:
- lib/rack/downtime/strategy.rb
Class Attribute Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(param = nil) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(param = nil) ⇒ Query
Returns a new instance of Query.
68 69 70 |
# File 'lib/rack/downtime/strategy.rb', line 68 def initialize(param = nil) @param = param || self.class.param end |
Class Attribute Details
.param ⇒ Object
63 64 65 |
# File 'lib/rack/downtime/strategy.rb', line 63 def param @param ||= "__dt__" end |
Instance Method Details
#call(env) ⇒ Object
72 73 74 75 |
# File 'lib/rack/downtime/strategy.rb', line 72 def call(env) req = Rack::Request.new(env) Rack::Downtime::Utils.parse_downtime(req[@param]) end |