Class: Dir
- Inherits:
-
Object
- Object
- Dir
- Defined in:
- lib/calatrava/template.rb
Class Method Summary collapse
Class Method Details
.walk(start_dir, &blk) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/calatrava/template.rb', line 3 def self.walk(start_dir, &blk) Dir["#{start_dir}/{*,.*}"].each do |item| blk.call item if File.directory?(item) && !(item =~ /\/\.$/) && !(item =~ /\/\.\.$/) walk(item, &blk) end end end |