Module: What::Modules
- Defined in:
- lib/what/modules.rb
Defined Under Namespace
Classes: Base, Disk, Existence, Process, Unicorn, What
Class Method Summary collapse
-
.load_all ⇒ Object
load all modules defined in what/modules, in addition to any paths specified in the config file.
Class Method Details
.load_all ⇒ Object
load all modules defined in what/modules, in addition to any paths specified in the config file.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/what/modules.rb', line 5 def self.load_all require 'what/modules/base' default_modules_path = File.join(File.dirname(__FILE__), 'modules') require_dir(default_modules_path) Config['module_paths'].each do |module_path| path = if module_path.match(%r(^/)) module_path else File.join(Config['base'], module_path) end require_dir(path) end end |