class Rack::Printout
prints the environment and request for simple debugging
Public Class Methods
new(app)
click to toggle source
# File lib/rack/contrib/printout.rb 6 def initialize(app) 7 @app = app 8 end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/contrib/printout.rb 10 def call(env) 11 # See http://rack.rubyforge.org/doc/SPEC.html for details 12 puts "**********\n Environment\n **************" 13 puts env.inspect 14 15 puts "**********\n Response\n **************" 16 response = @app.call(env) 17 puts response.inspect 18 19 puts "**********\n Response contents\n **************" 20 response[2].each do |chunk| 21 puts chunk 22 end 23 puts "\n \n" 24 return response 25 end