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

Class Method Details

.clean(paths, options = {}) ⇒ Array<String>

Clean the changed paths and return only valid CoffeeScript files.

Parameters:

  • paths (Array<String>)

    the changed paths

  • options (Hash) (defaults to: {})

    the clean options

Options Hash (options):

  • :missing_ok (String)

    don’t remove missing files from list

Returns:

  • (Array<String>)

    the valid spec files



16
17
18
19
20
# File 'lib/guard/coffeescript/inspector.rb', line 16

def clean(paths, options = {})
  paths.uniq!
  paths.compact!
  paths.select { |p| coffee_file?(p, options) }
end