Fix Formula.installed?

This commit is contained in:
Max Howell 2009-07-29 00:57:55 +01:00
parent 90c7029144
commit fc6e9e5bab

View File

@ -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?