Skip to content

Commit

Permalink
more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jul 14, 2013
1 parent 9cccbcb commit 729a523
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib-topaz/dir.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
class Dir

def self.exists?(dirname)
if dirname.respond_to?(:to_path)
dirname = dirname.to_path
end
begin
!!new(dirname)
new(dirname)
rescue Errno::ENOENT, Errno::ENOTDIR
false
return false
else
return true
end
end

class << self
alias :exist? :exists?
end

end

0 comments on commit 729a523

Please sign in to comment.