Method: Glyph::Utils#load_files_from_dir
- Defined in:
- lib/glyph/utils.rb
#load_files_from_dir(dir, extension) {|file, contents| ... } ⇒ Object
Loads all child elements of the given directory, matching a given extension
88 89 90 91 92 93 94 |
# File 'lib/glyph/utils.rb', line 88 def load_files_from_dir(dir, extension, &block) if dir.exist? then dir.children.each do |c| block.call(c, file_load(c)) unless c.directory? || c.extname != extension end end end |