Move method from ObserverPathnameExtension to extend/Pathname
* This method is generally useful, even without the Observer extensions.
This commit is contained in:
parent
c2c0f681f5
commit
a6b6de63a9
@ -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?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user