Method: Utils::Finder#build_paths
- Defined in:
- lib/utils/finder.rb
#build_paths ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/utils/finder.rb', line 41 def build_paths paths = [] visit = -> filename { s = filename.stat bn = filename.pathname.basename if !s || s.directory? && @config.discover.prune?(bn) || s.file? && @config.discover.skip?(bn) then @args[?v] and warn "Pruning #{filename.inspect}." prune end true } find(*@roots, visit: visit) do |filename| filename.stat.directory? and filename << ?/ paths << filename end paths.uniq! paths end |