Class: AppMap::Handler::Function

Inherits:
AppMap::Hook::Method show all
Defined in:
lib/appmap/handler/function.rb

Overview

Base handler class, will emit method call and return events.

Direct Known Subclasses

Eval, Rails::Template::ResolverHandler

Instance Attribute Summary

Attributes inherited from AppMap::Hook::Method

#arity, #hook_class, #hook_method, #hook_package, #parameters

Instance Method Summary collapse

Methods inherited from AppMap::Hook::Method

#activate, #call, #initialize

Constructor Details

This class inherits a constructor from AppMap::Hook::Method

Instance Method Details

#handle_call(receiver, args) ⇒ Object



10
11
12
# File 'lib/appmap/handler/function.rb', line 10

def handle_call(receiver, args)
  AppMap::Event::MethodCall.build_from_invocation(defined_class, hook_method, receiver, args)
end

#handle_return(call_event_id, elapsed, return_value, exception) ⇒ Object



14
15
16
# File 'lib/appmap/handler/function.rb', line 14

def handle_return(call_event_id, elapsed, return_value, exception)
  AppMap::Event::MethodReturn.build_from_invocation(call_event_id, return_value, exception, elapsed: elapsed)
end