Sha256: 1fcb6b2db9b65c5a417573952f50ade09dafb2bd5d987d4eee27868329faa470
Contents?: true
Size: 387 Bytes
Versions: 10
Compression:
Stored size: 387 Bytes
Contents
class Dir # Like #each, except the "." and ".." special files are ignored. # You can use +ignore+ to override '.' and '..' and ignore # other entries via a exact match or regular expression. # # CREDIT: Tyler Rick def each_child(*ignore) ignore = ['.', '..'] if ignore.empty? each do |file| yield file unless ignore.any?{ |i| i === file } end end end
Version data entries
10 entries across 9 versions & 2 rubygems