Sha256: c0c972d5efb54f88e7385e587f7b20a42a7f64d6d2031c74f6f6461c84a0867c
Contents?: true
Size: 501 Bytes
Versions: 8
Compression:
Stored size: 501 Bytes
Contents
module Mutant # Require highjack module RequireHighjack # Install require callback # # @param [Module] target # @param [#call] callback # # @return [#call] # the original implementation on singleton # # @api private def self.call(target, callback) target.method(:require).tap do target.module_eval do define_method(:require, &callback) public :require end end end end # RequireHighjack end # Mutant
Version data entries
8 entries across 8 versions & 1 rubygems