class Rack::Bug::MustachePanel
Constants
- LIMIT
- VERSION
Public Class Methods
reset()
click to toggle source
Clear out our page load-specific variables.
# File lib/rack/bug/panels/mustache_panel.rb, line 43 def self.reset Thread.current["rack.bug.mustache.times"] = {} Thread.current["rack.bug.mustache.vars"] = {} end
times()
click to toggle source
The view render times for this page load
# File lib/rack/bug/panels/mustache_panel.rb, line 49 def self.times Thread.current["rack.bug.mustache.times"] ||= {} end
variables()
click to toggle source
The variables used on this page load
# File lib/rack/bug/panels/mustache_panel.rb, line 54 def self.variables Thread.current["rack.bug.mustache.vars"] ||= {} end
Public Instance Methods
content()
click to toggle source
The content of our Rack::Bug
panel
# File lib/rack/bug/panels/mustache_panel.rb, line 71 def content View.render ensure self.class.reset end
heading()
click to toggle source
The string used for our tab in Rack::Bug
‘s navigation bar
# File lib/rack/bug/panels/mustache_panel.rb, line 64 def heading "{{%.2fms}}" % self.class.times.values.reduce(0.0) do |sum, obj| sum + obj end end
name()
click to toggle source
The name of this Rack::Bug
panel
# File lib/rack/bug/panels/mustache_panel.rb, line 59 def name "mustache" end