Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#each_dir(path, &block) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'bin/gh-push', line 19

def each_dir(path, &block)
  Dir.foreach(path) do |item|
    next if item == '.' or item == '..'
    if File.directory? File.join(path, item)
      each_dir(File.join(path, item), &block)
    else
      block.call(File.join(path, item))
    end
  end
end