Class: Rack::Bug::TemplatesPanel::Trace
- Inherits:
-
Object
- Object
- Rack::Bug::TemplatesPanel::Trace
- Defined in:
- lib/rack/bug/panels/templates_panel/trace.rb
Instance Method Summary collapse
- #finished(template_name) ⇒ Object
-
#initialize ⇒ Trace
constructor
A new instance of Trace.
- #root ⇒ Object
- #start(template_name) ⇒ Object
- #total_time ⇒ Object
Constructor Details
Instance Method Details
#finished(template_name) ⇒ Object
14 15 16 17 |
# File 'lib/rack/bug/panels/templates_panel/trace.rb', line 14 def finished(template_name) @current.end_time = Time.now @current = @current.parent end |
#root ⇒ Object
27 28 29 |
# File 'lib/rack/bug/panels/templates_panel/trace.rb', line 27 def root @root ||= Rendering.new("root") end |
#start(template_name) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rack/bug/panels/templates_panel/trace.rb', line 7 def start(template_name) rendering = Rendering.new(template_name) rendering.start_time = Time.now @current.add(rendering) @current = rendering end |
#total_time ⇒ Object
23 24 25 |
# File 'lib/rack/bug/panels/templates_panel/trace.rb', line 23 def total_time root.child_time end |