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
|
def subdirs
|
||||||
children.select{ |child| child.directory? }
|
children.select{ |child| child.directory? }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def resolved_path_exists?
|
||||||
|
(dirname+readlink).exist?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# sets $n and $d so you can observe creation of stuff
|
# sets $n and $d so you can observe creation of stuff
|
||||||
@ -209,9 +213,6 @@ module ObserverPathnameExtension
|
|||||||
puts "rmdir #{to_s}" if ARGV.verbose?
|
puts "rmdir #{to_s}" if ARGV.verbose?
|
||||||
$d+=1
|
$d+=1
|
||||||
end
|
end
|
||||||
def resolved_path_exists?
|
|
||||||
(dirname+readlink).exist?
|
|
||||||
end
|
|
||||||
def mkpath
|
def mkpath
|
||||||
super
|
super
|
||||||
puts "mkpath #{to_s}" if ARGV.verbose?
|
puts "mkpath #{to_s}" if ARGV.verbose?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user