Class: Merb::BootLoader::Dependencies
- Inherits:
-
Merb::BootLoader
- Object
- Merb::BootLoader
- Merb::BootLoader::Dependencies
- Defined in:
- lib/merb-core/bootloader.rb
Class Method Summary collapse
- .enable_json_gem ⇒ Object
- .load_dependencies ⇒ Object
-
.run ⇒ Object
Load the init_file specified in Merb::Config or if not specified, the init.rb file from the Merb configuration directory, and any environment files, which register the list of necessary dependencies and any after_app_loads hooks.
- .update_logger ⇒ Object
Methods inherited from Merb::BootLoader
after, after_app_loads, before, before_app_loads, default_framework, finished?, inherited, move_klass
Class Method Details
.enable_json_gem ⇒ Object
270 271 272 273 274 |
# File 'lib/merb-core/bootloader.rb', line 270 def self.enable_json_gem require "json/ext" rescue LoadError require "json/pure" end |
.load_dependencies ⇒ Object
266 267 268 |
# File 'lib/merb-core/bootloader.rb', line 266 def self.load_dependencies dependencies.each { |name, ver| Kernel.load_dependency(name, *ver) } end |
.run ⇒ Object
Load the init_file specified in Merb::Config or if not specified, the init.rb file from the Merb configuration directory, and any environment files, which register the list of necessary dependencies and any after_app_loads hooks.
Dependencies can hook into the bootloader process itself by using before or after insertion methods. Since these are loaded from this bootloader (Dependencies), they can only adapt the bootloaders that haven’t been loaded up until this point.
258 259 260 261 262 263 264 |
# File 'lib/merb-core/bootloader.rb', line 258 def self.run load_initfile load_env_config enable_json_gem unless Merb::disabled?(:json) load_dependencies update_logger end |