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

Version Path
routemaster-drain-3.0.0 spec/support/breakpoint_class.rb
routemaster-drain-2.5.4 spec/support/breakpoint_class.rb
routemaster-drain-2.5.3 spec/support/breakpoint_class.rb
routemaster-drain-2.5.2 spec/support/breakpoint_class.rb
routemaster-drain-2.5.1 spec/support/breakpoint_class.rb
routemaster-drain-2.5.0 spec/support/breakpoint_class.rb
routemaster-drain-2.4.4 spec/support/breakpoint_class.rb
routemaster-drain-2.4.3 spec/support/breakpoint_class.rb
routemaster-drain-2.4.2 spec/support/breakpoint_class.rb
routemaster-drain-2.4.1 spec/support/breakpoint_class.rb
routemaster-drain-2.4.0 spec/support/breakpoint_class.rb