class StackProf::Webnav::Server
Attributes
cmd_options[RW]
Public Instance Methods
current_dump()
click to toggle source
# File lib/stackprof-webnav/server.rb, line 38 def current_dump Thread.current[:cache] = {} Thread.current[params[:dump]] ||= Dump.new(params[:dump]) end
current_report()
click to toggle source
# File lib/stackprof-webnav/server.rb, line 43 def current_report StackProf::Report.new( Marshal.load(current_dump.content) ) end
ensure_file_generated(path, &block)
click to toggle source
# File lib/stackprof-webnav/server.rb, line 53 def ensure_file_generated(path, &block) return if File.exist?(path) File.open(path, 'wb', &block) end
presenter()
click to toggle source
# File lib/stackprof-webnav/server.rb, line 49 def presenter Presenter.new(current_report) end
url_for(path, options={})
click to toggle source
# File lib/stackprof-webnav/server.rb, line 58 def url_for(path, options={}) query = URI.encode_www_form({dump: params[:dump]}.merge(options)) path + "?" + query end