Module: Guard::CoffeeScript::Inspector
- Defined in:
- lib/guard/coffeescript/inspector.rb
Overview
The inspector verifies of the changed paths are valid for Guard::CoffeeScript.
Class Method Summary (collapse)
-
+ (Array<String>) clean(paths, options = {})
Clean the changed paths and return only valid CoffeeScript files.
-
+ (Boolean) coffee_file?(path, options)
private
Tests if the file is valid.
Class Method Details
+ (Array<String>) clean(paths, options = {})
Clean the changed paths and return only valid CoffeeScript files.
18 19 20 21 22 |
# File 'lib/guard/coffeescript/inspector.rb', line 18 def clean(paths, = {}) paths.uniq! paths.compact! paths.select { |p| coffee_file?(p, ) } end |
+ (Boolean) coffee_file?(path, options) (private)
Tests if the file is valid.
33 34 35 |
# File 'lib/guard/coffeescript/inspector.rb', line 33 def coffee_file?(path, ) path =~ /.coffee$/ && ([:missing_ok] || File.exists?(path)) end |