Module: Magic::CoreExt

Defined in:
lib/magic/core_ext.rb,
lib/magic/core_ext/kernel.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Kernel

Class Method Summary collapse

Class Method Details

.kernelObject



19
20
21
22
23
# File 'lib/magic/core_ext/kernel.rb', line 19

def kernel(&)
	Module.new(&).tap do |kernel|
		Kernel::MODULES.each { _1.include kernel }
	end
end

.require_all(scope = __FILE__) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/magic/core_ext.rb', line 7

def require_all scope = __FILE__
	scope
			.delete_suffix('.rb')
			.then { Pathname _1 }
			.glob('*.rb')
			.each { require _1 }
end