Module: Velcro::FileHelpers
Instance Method Summary collapse
Instance Method Details
#location ⇒ Object
3 4 5 |
# File 'lib/velcro/file_helpers.rb', line 3 def location ENV['VELCRO_BREWFILE'] || recursive_search end |
#recursive_search(directory = Dir.pwd) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/velcro/file_helpers.rb', line 7 def recursive_search(directory = Dir.pwd) until directory == '/' return directory if File.exists?(brewfile_in(directory)) directory = File.(File.join(directory, '..')) end end |