Move method from ObserverPathnameExtension to extend/Pathname

* This method is generally useful, even without the Observer extensions.
This commit is contained in:
Adam Vandenberg 2010-06-14 11:56:27 -07:00
parent c2c0f681f5
commit a6b6de63a9

View File

@ -195,6 +195,10 @@ class Pathname
def subdirs
children.select{ |child| child.directory? }
end
def resolved_path_exists?
(dirname+readlink).exist?
end
end
# sets $n and $d so you can observe creation of stuff
@ -209,9 +213,6 @@ module ObserverPathnameExtension
puts "rmdir #{to_s}" if ARGV.verbose?
$d+=1
end
def resolved_path_exists?
(dirname+readlink).exist?
end
def mkpath
super
puts "mkpath #{to_s}" if ARGV.verbose?