aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-07-29 00:57:55 +0100
committerMax Howell2009-07-29 01:00:26 +0100
commitfc6e9e5baba6fa4f986e729cb780fe52645494b7 (patch)
treeae997d2a23ea8ede6515e489880b37409e0ce01c /Library
parent90c7029144d6441bd8594c7e5c843e3aee583ffb (diff)
downloadbrew-fc6e9e5baba6fa4f986e729cb780fe52645494b7.tar.bz2
Fix Formula.installed?
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index c344437e1..5c082e490 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -51,16 +51,15 @@ class AbstractFormula
end
# end ruby is weird section
- def version
- @version
- end
- def name
- @name
+ attr_reader :version, :name
+
+ # reimplement if your package has dependencies
+ def deps
end
# if the dir is there, but it's empty we consider it not installed
def installed?
- return prefix.children.count > 0
+ return prefix.children.length > 0
rescue
return false
end
@@ -74,7 +73,6 @@ class AbstractFormula
# end ruby is weird section
end
-public
def prefix
raise "@name.nil!" if @name.nil?
raise "@version.nil?" if @version.nil?