aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-14 11:56:27 -0700
committerAdam Vandenberg2010-07-08 22:41:50 -0700
commita6b6de63a999494e378ec9ce50bec85fa7a8f918 (patch)
tree11765a3178ceb02c346578f57dda9d188d5d0441 /Library/Homebrew
parentc2c0f681f5af398eb6485db41b0d89680b08c41c (diff)
downloadbrew-a6b6de63a999494e378ec9ce50bec85fa7a8f918.tar.bz2
Move method from ObserverPathnameExtension to extend/Pathname
* This method is generally useful, even without the Observer extensions.
Diffstat (limited to 'Library/Homebrew')
-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?