Method: Module::Reloader.reload
- Defined in:
- lib/module_ext.rb
.reload(*mods) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/module_ext.rb', line 23 def self.reload(*mods) source_files = mods.map(&:source_files).flatten.uniq # Skip files that live in .gem and .rvm directories. source_files.reject! do |source_file| source_file =~ /\/\.gem\// || source_file =~ /\/\.rvm\// end source_files.each do |source_file| reload_file(source_file) end end |