2013-02-06 22:49:43 -06:00
|
|
|
require 'version'
|
|
|
|
|
|
|
|
module MacOS
|
|
|
|
class Version < ::Version
|
|
|
|
def <=>(other)
|
|
|
|
v = case other
|
|
|
|
when :mountain_lion then 10.8
|
|
|
|
when :lion then 10.7
|
|
|
|
when :snow_leopard then 10.6
|
|
|
|
when :leopard then 10.5
|
2013-05-20 18:41:49 -05:00
|
|
|
when :tiger then 10.4
|
2013-02-06 22:49:43 -06:00
|
|
|
else other.to_s
|
|
|
|
end
|
|
|
|
super(Version.new(v))
|
|
|
|
end
|
2013-06-14 11:56:33 -07:00
|
|
|
|
|
|
|
def pretty_name
|
|
|
|
@version.split('_').map(&:capitalize).join(' ')
|
|
|
|
end
|
2013-02-06 22:49:43 -06:00
|
|
|
end
|
|
|
|
end
|