Method: Pacer.reload!

Defined in:
lib/pacer.rb

.reload!Object

Reload all Ruby modified files in the Pacer library. Useful for debugging in the console. Does not do any of the fancy stuff that Rails reloading does. Certain types of changes will still require restarting the session.



88
89
90
91
92
93
94
95
96
97
98
# File 'lib/pacer.rb', line 88

def reload!
  require 'pathname'
  Pathname.new(File.expand_path(__FILE__)).parent.find do |path|
    if path.extname == '.rb' and path.mtime > reload_time
      puts path.to_s
      load path.to_s
    end
  end
  clear_plugin_cache
  @reload_time = Time.now
end