aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-14 11:56:27 -0700
committerAdam Vandenberg2010-07-08 22:41:50 -0700
commit2dadd631905ee6a7c9d2aebf65d0b81b98ac7071 (patch)
treed0baa218e768052c51ff6eebf02fe5392d64b5e8 /Library
parent9e6a2400640d547e2f59baad4f7626302ac3af24 (diff)
downloadhomebrew-2dadd631905ee6a7c9d2aebf65d0b81b98ac7071.tar.bz2
Move method from ObserverPathnameExtension to extend/Pathname
* This method is generally useful, even without the Observer extensions.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 78734677a..0b1c27806 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -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?