class RSpecLive::FileWatcher
Public Class Methods
new(path)
click to toggle source
# File lib/rspec-live/file_watcher.rb, line 3 def initialize(path) @updated, @added, @removed = [], [], [] Listen.to(path) do |updated, added, removed| @updated += updated @added += added @removed += removed end.start end
Public Instance Methods
added()
click to toggle source
# File lib/rspec-live/file_watcher.rb, line 16 def added queued_results @added end
removed()
click to toggle source
# File lib/rspec-live/file_watcher.rb, line 20 def removed queued_results @removed end
updated()
click to toggle source
# File lib/rspec-live/file_watcher.rb, line 12 def updated queued_results @updated end
Private Instance Methods
queued_results(queue)
click to toggle source
# File lib/rspec-live/file_watcher.rb, line 26 def queued_results(queue) queue.pop queue.length end