Module: TermUtils::FF

Defined in:
lib/term_utils/ff.rb,
lib/term_utils/ff/entry.rb,
lib/term_utils/ff/query.rb,
lib/term_utils/ff/config.rb,
lib/term_utils/ff/finder.rb

Overview

Provides ways to find files.

Defined Under Namespace

Classes: Config, Context, Entry, Finder, FinderEntry, FinderQuery, Query

Class Method Summary collapse

Class Method Details

.find(*paths, &block) ⇒ Array<Hash>

Finds files.

Parameters:

  • paths (Array<String>)

Returns:

  • (Array<Hash>)


244
245
246
247
248
249
250
251
252
253
# File 'lib/term_utils/ff/finder.rb', line 244

def self.find(*paths, &block)
  fdr =
    if paths.empty?
      TermUtils::FF::Finder.new(['.'])
    else
      TermUtils::FF::Finder.new(paths)
    end
  block&.call(fdr.query)
  fdr.exec
end