Class: AppMap::Handler::Rails::Template::RenderHandler
- Inherits:
-
Object
- Object
- AppMap::Handler::Rails::Template::RenderHandler
- Defined in:
- lib/appmap/handler/rails/template.rb
Overview
Hooks the ActionView::Renderer method render. This method is used by Rails to perform template rendering. The TemplateCall event which is emitted by this handler has a path parameter, which is nil until it’s filled in by a ResolverHandler.
Class Method Summary collapse
- .handle_call(defined_class, hook_method, receiver, args) ⇒ Object
- .handle_return(call_event_id, elapsed, return_value, exception) ⇒ Object
Class Method Details
.handle_call(defined_class, hook_method, receiver, args) ⇒ Object
148 149 150 151 152 153 154 155 156 157 |
# File 'lib/appmap/handler/rails/template.rb', line 148 def handle_call(defined_class, hook_method, receiver, args) context, = args warn "Renderer: #{options}" if LOG TemplateCall.new(receiver).tap do |call| Thread.current[TEMPLATE_RENDERER] ||= [] Thread.current[TEMPLATE_RENDERER] << call end end |
.handle_return(call_event_id, elapsed, return_value, exception) ⇒ Object
159 160 161 162 163 |
# File 'lib/appmap/handler/rails/template.rb', line 159 def handle_return(call_event_id, elapsed, return_value, exception) Array(Thread.current[TEMPLATE_RENDERER]).pop AppMap::Event::MethodReturnIgnoreValue.build_from_invocation(call_event_id, elapsed: elapsed) end |