Class: Rack::Events::EventedBodyProxy
- Defined in:
- lib/rack/events.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(body, request, response, handlers, &block) ⇒ EventedBodyProxy
constructor
A new instance of EventedBodyProxy.
Methods inherited from BodyProxy
#close, #closed?, #method_missing, #respond_to_missing?
Constructor Details
#initialize(body, request, response, handlers, &block) ⇒ EventedBodyProxy
Returns a new instance of EventedBodyProxy.
82 83 84 85 86 87 |
# File 'lib/rack/events.rb', line 82 def initialize(body, request, response, handlers, &block) super(body, &block) @request = request @response = response @handlers = handlers end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rack::BodyProxy
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
80 81 82 |
# File 'lib/rack/events.rb', line 80 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
80 81 82 |
# File 'lib/rack/events.rb', line 80 def response @response end |
Instance Method Details
#each ⇒ Object
89 90 91 92 |
# File 'lib/rack/events.rb', line 89 def each @handlers.reverse_each { |handler| handler.on_send request, response } super end |