Class: RubyApp::Rack::Request
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 28 29 |
# 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("REQUEST RubyApp::Request.environment[#{name.inspect}]=#{value.inspect}") # end # RubyApp::Log.debug("REQUEST RubyApp::Request.path=#{RubyApp::Request.path.inspect}") # RubyApp::Log.debug("REQUEST RubyApp::Request.language=#{RubyApp::Request.language.inspect}") # RubyApp::Log.debug("REQUEST RubyApp::Request.url=#{RubyApp::Request.url.inspect}") # RubyApp::Log.debug("REQUEST RubyApp::Request.query=#{RubyApp::Request.query.inspect}") # RubyApp::Request.query.each do |name, value| # RubyApp::Log.debug("REQUEST RubyApp::Request.query[#{name.inspect}]=#{value.inspect}") # end return @application.call(environment) ensure RubyApp::Request.destroy! end end |