Class: Dir

Inherits:
Object show all
Defined in:
lib/lab419/core/dir.rb

Instance Method Summary collapse

Instance Method Details

#each_path(&blk) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/lab419/core/dir.rb', line 2

def each_path &blk
  if blk
    each do | fn |
      blk.( fn, File.join( path, fn ) )
    end
  else
    Enumerator.new do | yielder |
      each do | fn |
        yielder.yield [fn, File.join( path, fn )]
      end
    end
  end
end