diff options
| author | Adam Vandenberg | 2010-06-14 11:56:27 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-07-08 22:41:50 -0700 |
| commit | a6b6de63a999494e378ec9ce50bec85fa7a8f918 (patch) | |
| tree | 11765a3178ceb02c346578f57dda9d188d5d0441 /Library | |
| parent | c2c0f681f5af398eb6485db41b0d89680b08c41c (diff) | |
| download | brew-a6b6de63a999494e378ec9ce50bec85fa7a8f918.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.rb | 7 |
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? |
