Module: Kernel

Defined in:
lib/rc/core_ext/kernel.rb

Overview

require ‘finder/import’

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.require(feature) ⇒ Object

Redefine Kernel.require with callback.



30
31
32
33
34
# File 'lib/rc/core_ext/kernel.rb', line 30

def require(feature)
  result = require_without_rc(feature)
  RC.required(feature) if result
  result
end

.require_without_rcObject

Alias original Kernel.require method.



25
# File 'lib/rc/core_ext/kernel.rb', line 25

alias_method :require_without_rc, :require

Instance Method Details

#require(feature, options = nil) ⇒ Object (private)

Redefine Kernel#require with callback.



15
16
17
18
19
# File 'lib/rc/core_ext/kernel.rb', line 15

def require(feature, options=nil)
  result = require_without_rc(feature)
  RC.required(feature) if result
  result
end

#require_without_rcObject (private)

Alias original Kernel#require method.



10
# File 'lib/rc/core_ext/kernel.rb', line 10

alias_method :require_without_rc, :require