module Kojak
Constants
- VERSION
Public Class Methods
register_investigator_for!(cls, m)
click to toggle source
Internal: Registers investigator within given class for specified method.
cls - The Class that will be affected. m - The Method to override with investigation support.
Returns nothing.
# File lib/kojak/inspector.rb, line 8 def self.register_investigator_for!(cls, m) cls.send(:define_method, m.name) do |*args,&block| begin caller = Caller.new(m.bind(self)) caller.call(*args,&block) ensure Kojak.print(caller) if caller end end end