Sha256: 6eb6d8b9afba8a53b3cf1ada0e199e9d4c98a06d354836ebbbab8a75455e8fa3
Contents?: true
Size: 377 Bytes
Versions: 31
Compression:
Stored size: 377 Bytes
Contents
require 'fork_break' def breakpoint_class(klass, method_name) breakpoint_prepend = Module.new do define_method(method_name) do | *args | breakpoints << :"before_#{method_name}" result = super(*args) breakpoints << :"after_#{method_name}" return result end end klass.include(ForkBreak::Breakpoints) klass.prepend(breakpoint_prepend) end
Version data entries
31 entries across 31 versions & 1 rubygems