Module: RbReloader

Defined in:
lib/rb_reloader.rb,
lib/rb_reloader/version.rb

Defined Under Namespace

Classes: FileWatcher

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.register(files = []) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/rb_reloader.rb', line 49

def register(files = [])
  files.flatten.each do |file|
    # Rubinius and JRuby ignore block passed to glob.
    Dir.glob(file).each { |f| FileWatcher[f] }
    #FileWatcher[file]
  end
end

.registered_rbObject



61
62
63
64
65
# File 'lib/rb_reloader.rb', line 61

def registered_rb
  files = []
  FileWatcher.each {|x| files << x.file }
  files
end

.reloadObject



57
58
59
# File 'lib/rb_reloader.rb', line 57

def reload
  FileWatcher.each {|x| x.reload}
end