Class: Merb::BootLoader::ReloadClasses
- Inherits:
-
Merb::BootLoader
- Object
- Merb::BootLoader
- Merb::BootLoader::ReloadClasses
- Defined in:
- lib/merb-core/bootloader.rb
Defined Under Namespace
Classes: TimedExecutor
Class Method Summary collapse
-
.reload ⇒ Object
Reloads all files.
-
.run ⇒ Object
Setup the class reloader if it’s been specified in config.
Methods inherited from Merb::BootLoader
after, after_app_loads, before, before_app_loads, default_framework, finished?, inherited, move_klass
Class Method Details
.reload ⇒ Object
Reloads all files.
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/merb-core/bootloader.rb', line 700 def self.reload paths = [] Merb.load_paths.each do |path_name, file_info| path, glob = file_info next unless glob paths << Dir[path / glob] end paths << Merb.dir_for(:application) if Merb.dir_for(:application) && File.file?(Merb.dir_for(:application)) paths.flatten.each do |file| next if Merb::BootLoader::LoadClasses::MTIMES[file] && Merb::BootLoader::LoadClasses::MTIMES[file] == File.mtime(file) Merb::BootLoader::LoadClasses.reload(file) end end |