Class | Guard::Listener |
In: |
lib/guard/listener.rb
|
Parent: | Object |
The Listener is the base class for all listener implementations.
@abstract
DEFAULT_IGNORE_PATHS | = | %w[. .. .bundle .git log tmp vendor] | Default paths that gets ignored by the listener |
changed_files | [RW] | |
directory | [R] | |
ignore_paths | [R] |
Initialize the listener.
@param [String] directory the root directory to listen to @option options [Boolean] relativize_paths use only relative paths @option options [Array<String>] ignore_paths the paths to ignore by the listener
Select the appropriate listener implementation for the current OS and initializes it.
@param [Array] args the arguments for the listener @return [Guard::Listener] the chosen listener
Removes the ignored paths from the directory list.
@param [Array<String>] dirs the directory to listen to @param [Array<String>] ignore_paths the paths to ignore @return children of the passed dirs that are not in the ignore_paths list
Get the modified files.
If the `:watch_all_modifications` option is true, then moved and deleted files are also reported, but prefixed by an exclamation point.
@example Deleted or moved file
!/home/user/dir/file.rb
@param [Array<String>] dirs the watched directories @param [Hash] options the listener options @option options [Symbol] all whether to files in sub directories @return [Array<String>] paths of files that have been modified
Scopes all given paths to the current directory.
@param [Array<String>] paths the paths to change @return [Array<String>] all paths now relative to the current dir
Use paths relative to the current directory.
@return [Boolean] whether to use relative or absolute paths