Class: RubyApp::Rack::Response
- Inherits:
-
Object
- Object
- RubyApp::Rack::Response
- Defined in:
- lib/ruby_app/rack/response.rb
Instance Method Summary collapse
- #call(environment) ⇒ Object
-
#initialize(application) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(application) ⇒ Response
Returns a new instance of Response.
8 9 10 |
# File 'lib/ruby_app/rack/response.rb', line 8 def initialize(application) @application = application end |
Instance Method Details
#call(environment) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby_app/rack/response.rb', line 12 def call(environment) RubyApp::Response.create! begin @application.call(environment) return RubyApp::Response.finish ensure RubyApp::Response.destroy! end end |