aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat
diff options
context:
space:
mode:
authorJack Nagel2012-08-14 11:37:29 -0500
committerJack Nagel2012-08-18 11:25:59 -0500
commit166a9ba0ed6573a7438c0ac5691ccdf4f06f7bfe (patch)
treef7c9c57bb95802b69ff7904e777273361b721688 /Library/Homebrew/compat
parentb8231fc5f3e93f2d7a230e7880fb2fdc7c04c369 (diff)
downloadbrew-166a9ba0ed6573a7438c0ac5691ccdf4f06f7bfe.tar.bz2
Deprecate MacOS.version? style methods
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/compat')
-rw-r--r--Library/Homebrew/compat/compatibility.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb
index a8b6afb70..bbd349249 100644
--- a/Library/Homebrew/compat/compatibility.rb
+++ b/Library/Homebrew/compat/compatibility.rb
@@ -197,4 +197,23 @@ module MacOS extend self
def x11_prefix
X11.prefix
end
+
+ def leopard?
+ 10.5 == MACOS_VERSION
+ end
+
+ def snow_leopard?
+ 10.6 <= MACOS_VERSION # Actually Snow Leopard or newer
+ end
+ alias_method :snow_leopard_or_newer?, :snow_leopard?
+
+ def lion?
+ 10.7 <= MACOS_VERSION # Actually Lion or newer
+ end
+ alias_method :lion_or_newer?, :lion?
+
+ def mountain_lion?
+ 10.8 <= MACOS_VERSION # Actually Mountain Lion or newer
+ end
+ alias_method :mountain_lion_or_newer?, :mountain_lion?
end