Class: Kicker::FSEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/kicker/fsevents.rb

Defined Under Namespace

Classes: FSEvent

Class Method Summary collapse

Class Method Details

.start_watching(paths, options = {}, &block) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/kicker/fsevents.rb', line 25

def self.start_watching(paths, options={}, &block)
  fsevent = ::FSEvent.new
  fsevent.watch(paths, options) do |directories|
    yield directories.map { |directory| Kicker::FSEvents::FSEvent.new(directory) }
  end
  fsevent.run
end