Class: Providence::EventHandler::Darwin

Inherits:
FSEvent
  • Object
show all
Includes:
Watchr::EventHandler::Base
Defined in:
lib/providence/event_handlers/darwin.rb

Overview

Uses ruby-fsevents (github.com/thibaudgg/rb-fsevent)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDarwin

Returns a new instance of Darwin.



11
12
13
# File 'lib/providence/event_handlers/darwin.rb', line 11

def initialize
  super
end

Instance Attribute Details

#watched_pathsObject

Returns the value of attribute watched_paths.



8
9
10
# File 'lib/providence/event_handlers/darwin.rb', line 8

def watched_paths
  @watched_paths
end

Instance Method Details

#listen(monitored_paths) ⇒ Object



15
16
17
18
# File 'lib/providence/event_handlers/darwin.rb', line 15

def listen(monitored_paths)
  watch_paths(monitored_paths)
  run
end

#refresh(monitored_paths) ⇒ Object



20
21
22
23
# File 'lib/providence/event_handlers/darwin.rb', line 20

def refresh(monitored_paths)
  stop
  listen(monitored_paths)
end