Class: Rack::Congestion::Request
- Inherits:
-
Object
- Object
- Rack::Congestion::Request
- Extended by:
- Forwardable
- Defined in:
- lib/rack/congestion/request.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#key ⇒ Object
Returns the value of attribute key.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #congestion ⇒ Object
-
#initialize(env, key, options = { }) ⇒ Request
constructor
A new instance of Request.
- #rack_request ⇒ Object
Constructor Details
#initialize(env, key, options = { }) ⇒ Request
Returns a new instance of Request.
18 19 20 21 22 |
# File 'lib/rack/congestion/request.rb', line 18 def initialize(env, key, = { }) self.env = env self.key = key self. = end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
7 8 9 |
# File 'lib/rack/congestion/request.rb', line 7 def env @env end |
#key ⇒ Object
Returns the value of attribute key.
7 8 9 |
# File 'lib/rack/congestion/request.rb', line 7 def key @key end |
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/rack/congestion/request.rb', line 7 def @options end |
Instance Method Details
#congestion ⇒ Object
28 29 30 |
# File 'lib/rack/congestion/request.rb', line 28 def congestion @congestion ||= ::Congestion.request key.call, end |
#rack_request ⇒ Object
24 25 26 |
# File 'lib/rack/congestion/request.rb', line 24 def rack_request @rack_request ||= Rack::Request.new env end |