Class Listen::MultiListener
In: lib/listen/multi_listener.rb
Parent: Listener

Methods

filter   filter!   ignore   ignore!   new   on_change   start   unpause  

Attributes

adapter  [R] 
directories  [R] 
directories_records  [R] 

Public Class methods

Initializes the multiple directories listener.

@param [String] directories the directories to listen to @param [Hash] options the listen options @option options [Regexp] ignore a pattern for ignoring paths @option options [Regexp] filter a pattern for filtering paths @option options [Float] latency the delay between checking for changes in seconds @option options [Boolean] force_polling whether to force the polling adapter or not @option options [String, Boolean] polling_fallback_message to change polling fallback message or remove it

@yield [modified, added, removed] the changed files @yieldparam [Array<String>] modified the list of modified files @yieldparam [Array<String>] added the list of added files @yieldparam [Array<String>] removed the list of removed files

Public Instance methods

Adds file filters to the listener.

@param (see Listen::DirectoryRecord#filter)

@return [Listen::Listener] the listener

Replaces file filters in the listener.

@param (see Listen::DirectoryRecord#filter!)

@return [Listen::Listener] the listener

Adds ignored paths to the listener.

@param (see Listen::DirectoryRecord#ignore)

@return [Listen::Listener] the listener

Replaces ignored paths in the listener.

@param (see Listen::DirectoryRecord#ignore!)

@return [Listen::Listener] the listener

Runs the callback passing it the changes if there are any.

@param (see Listen::DirectoryRecord#fetch_changes)

Starts the listener by initializing the adapter and building the directory record concurrently, then it starts the adapter to watch for changes.

@param [Boolean] blocking whether or not to block the current thread after starting

Unpauses the listener.

@return [Listen::Listener] the listener

[Validate]