class Sinatra::SinareyReloader::Watcher::List
Public Class Methods
for(app)
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 15 def self.for(app) @app_list_map[app] end
new()
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 19 def initialize @path_watcher_map = Hash.new do |hash, key| hash[key] = Watcher.new(key) end end
Public Instance Methods
ignore(path)
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 29 def ignore(path) watcher_for(path).ignore end
updated()
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 42 def updated watchers.find_all(&:updated?) end
watch(path, element)
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 25 def watch(path, element) watcher_for(path).elements << element end
watcher_for(path)
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 33 def watcher_for(path) @path_watcher_map[File.expand_path(path)] end
Also aliased as: watch_file
watchers()
click to toggle source
# File lib/sinatra/sinarey_reloader.rb, line 38 def watchers @path_watcher_map.values end