Skip to content

Instantly share code, notes, and snippets.

@y-yagi
Created December 11, 2016 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y-yagi/506e811e96847701b6aacd6863627456 to your computer and use it in GitHub Desktop.
Save y-yagi/506e811e96847701b6aacd6863627456 to your computer and use it in GitHub Desktop.
trace = TracePoint.new(:call) do |tp|
if tp.method_id == :before_filter || tp.method_id == :after_filter || tp.method_id == :prepend_before_filter
p [tp.lineno, tp.defined_class, tp.method_id, tp.event]
puts tp.send(:caller).join("\n")
end
end
trace.enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment