Class: Guard::Darwin
Overview
Listener implementation for Mac OS X ‘FSEvents`.
Constant Summary
Constants inherited from Listener
Listener::DEFAULT_IGNORE_PATHS
Instance Attribute Summary
Attributes inherited from Listener
#changed_files, #directory, #ignore_paths
Class Method Summary collapse
-
.usable?(no_vendor = false) ⇒ Boolean
Check if the listener is usable on the current OS.
Instance Method Summary collapse
-
#initialize ⇒ Darwin
constructor
Initialize the Listener.
-
#start ⇒ Object
Start the listener.
-
#stop ⇒ Object
Stop the listener.
Methods inherited from Listener
#all_files, #clear_changed_files, #exclude_ignored_paths, #modified_files, #on_change, #pause, #paused?, #relativize_paths, #relativize_paths?, #run, select_and_init, #start_reactor, #timestamp_files, #update_last_event
Constructor Details
Class Method Details
.usable?(no_vendor = false) ⇒ Boolean
Check if the listener is usable on the current OS.
32 33 34 35 36 37 38 |
# File 'lib/guard/listeners/darwin.rb', line 32 def self.usable?(no_vendor = false) $LOAD_PATH << File.('../../../vendor/darwin/lib', __FILE__) unless no_vendor require 'rb-fsevent' true rescue LoadError false end |
Instance Method Details
#start ⇒ Object
Start the listener.
16 17 18 19 |
# File 'lib/guard/listeners/darwin.rb', line 16 def start super worker.run end |
#stop ⇒ Object
Stop the listener.
23 24 25 26 |
# File 'lib/guard/listeners/darwin.rb', line 23 def stop super worker.stop end |