Class: RubyApp::Rack::Request
- Inherits:
-
Object
- Object
- RubyApp::Rack::Request
- Defined in:
- lib/ruby_app/rack/request.rb
Instance Method Summary collapse
- #call(environment) ⇒ Object
-
#initialize(application) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(application) ⇒ Request
Returns a new instance of Request.
8 9 10 |
# File 'lib/ruby_app/rack/request.rb', line 8 def initialize(application) @application = application end |
Instance Method Details
#call(environment) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ruby_app/rack/request.rb', line 12 def call(environment) RubyApp::Request.create!(environment) begin #RubyApp::Request.environment.each do |name, value| # RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} RubyApp::Request.environment[#{name.inspect}]=#{value.inspect}") #end #RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} RubyApp::Request.request_method=#{RubyApp::Request.request_method.inspect}") #RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} RubyApp::Request.path=#{RubyApp::Request.path.inspect}") #RubyApp::Request.query.each do |name, value| # RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} RubyApp::Request.query[#{name.inspect}]=#{value.inspect}") #end return @application.call(environment) ensure RubyApp::Request.destroy! end end |