Method: Brigit.at_dot_gitmodules
- Defined in:
- lib/brigit.rb
.at_dot_gitmodules(base = Dir.pwd) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/brigit.rb', line 12 def self.at_dot_gitmodules(base = Dir.pwd) Find.find(base) do |path| if File.basename(path) == '.git' && File.directory?(path) Find.prune elsif File.file?(File.join(path, '.gitmodules')) Dir.chdir path do yield path end end end end |