lib/gorillib/pathname/utils.rb in gorillib-0.5.0 vs lib/gorillib/pathname/utils.rb in gorillib-0.5.2
- old
+ new
@@ -12,9 +12,15 @@
def mkparent
dirname.mkpath
return self
end
+ # Like find, but returns an enumerable
+ #
+ def find_all
+ Enumerator.new{|yielder| find{|path| yielder << path } }
+ end
+
#
# Executes the block (passing the opened file) if the file does not
# exist. Ignores the block otherwise. The block is required.
#
# @param options