Module: Mutant::RequireHighjack Private
- Defined in:
- lib/mutant/require_highjack.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Require highjack
Class Method Summary collapse
-
.call(target, callback) ⇒ #call
private
Install require callback.
Class Method Details
.call(target, callback) ⇒ #call
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Install require callback
12 13 14 15 16 17 18 19 |
# File 'lib/mutant/require_highjack.rb', line 12 def self.call(target, callback) target.method(:require).tap do target.module_eval do define_method(:require, &callback) public :require end end end |