Guard::Polling

Polling listener that works cross-platform and has no dependencies. This is the listener that uses the most CPU processing power and has higher file IO that the other implementations.

Public Class Methods

new(*) click to toggle source

Initialize the Listener.

# File lib/guard/listeners/polling.rb, line 12
def initialize(*)
  super
  @latency = 1.5
end

Public Instance Methods

start() click to toggle source

Start the listener.

# File lib/guard/listeners/polling.rb, line 19
def start
  @stop = false
  super
  watch_change
end
stop() click to toggle source

Stop the listener.

# File lib/guard/listeners/polling.rb, line 27
def stop
  super
  @stop = true
end
watch(directory) click to toggle source

Watch the given directory for file changes.

@param [String] directory the directory to watch

# File lib/guard/listeners/polling.rb, line 36
def watch(directory)
  @existing = all_files
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.