aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os.rb
diff options
context:
space:
mode:
authorJack Nagel2013-10-18 12:56:51 -0500
committerJack Nagel2013-10-18 12:56:51 -0500
commitc511d7d2f43369773940dbb8fb8fbe8ed2153127 (patch)
treea68a04144c13d382da771d8c0a70208cb8453087 /Library/Homebrew/os.rb
parent45e7f0ccb09f29ef4180a66d758e21a6c3c6594f (diff)
downloadbrew-c511d7d2f43369773940dbb8fb8fbe8ed2153127.tar.bz2
Add OS.mac? and OS.linux?
Diffstat (limited to 'Library/Homebrew/os.rb')
-rw-r--r--Library/Homebrew/os.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb
new file mode 100644
index 000000000..e16c81c7d
--- /dev/null
+++ b/Library/Homebrew/os.rb
@@ -0,0 +1,9 @@
+module OS
+ def self.mac?
+ /darwin/i === RUBY_PLATFORM
+ end
+
+ def self.linux?
+ /linux/i === RUBY_PLATFORM
+ end
+end