module Tins::Find

Constants

EXPECTED_STANDARD_ERRORS

Public Class Methods

find(*paths) { |path| ... } click to toggle source

Calls the associated block with the name of every path and directory listed as arguments, then recursively on their subdirectories, and so on.

See the Find module documentation for an example.

# File lib/tins/find.rb, line 130
def find(*paths, &block) # :yield: path
  opts = Hash === paths.last ? paths.pop : {}
  Finder.new(opts).find(*paths, &block)
end
prune() click to toggle source

Skips the current path or directory, restarting the loop with the next entry. If the current path is a directory, that directory will not be recursively entered. Meaningful only within the block associated with Find::find.

See the Find module documentation for an example.

# File lib/tins/find.rb, line 143
def prune
  throw :prune
end

Private Instance Methods

find(*paths) { |path| ... } click to toggle source

Calls the associated block with the name of every path and directory listed as arguments, then recursively on their subdirectories, and so on.

See the Find module documentation for an example.

# File lib/tins/find.rb, line 130
def find(*paths, &block) # :yield: path
  opts = Hash === paths.last ? paths.pop : {}
  Finder.new(opts).find(*paths, &block)
end
prune() click to toggle source

Skips the current path or directory, restarting the loop with the next entry. If the current path is a directory, that directory will not be recursively entered. Meaningful only within the block associated with Find::find.

See the Find module documentation for an example.

# File lib/tins/find.rb, line 143
def prune
  throw :prune
end