Module: Cch::Commands::FileSystem

Included in:
Runner
Defined in:
lib/cch/commands/file_system.rb

Instance Method Summary collapse

Instance Method Details

#filter_files(files, patterns) ⇒ Object


4
5
6
7
8
9
10
11
# File 'lib/cch/commands/file_system.rb', line 4

def filter_files(files, patterns)
  filtered_files = patterns.flat_map do |pattern, transform|
    find_matched_files(files, pattern, transform)
  end

  filtered_files = existing_files(filtered_files)
  compact(filtered_files)
end