module Homecoming
Homecoming
searches for a given filename in the current and all parent directories.
# Given the following directory structure: / home/ rrrene/ projects/ your_project/ .yourconfig .yourconfig Homecoming.find(".yourconfig", "/home/rrrene/projects/your_project") # => ["/home/rrrene/.yourconfig", "/home/rrrene/projects/your_project/.yourconfig"]
If no path is given as second parameter, the current directory is the starting point of the traversal.
Constants
- VERSION
Public Class Methods
each(path = Dir.pwd, &block)
click to toggle source
# File lib/homecoming.rb, line 30 def self.each(path = Dir.pwd, &block) Homecoming::Traversal.new(path).each(&block) end
find(filename, path = Dir.pwd)
click to toggle source
# File lib/homecoming.rb, line 26 def self.find(filename, path = Dir.pwd) Homecoming::Find.new(filename, path).files end