lib/right_develop/utility/shell.rb in right_develop-3.1.4 vs lib/right_develop/utility/shell.rb in right_develop-3.1.5
- old
+ new
@@ -66,10 +66,20 @@
true
end
# @return [TrueClass|FalseClass] true if running on Windows platform
def is_windows?
- return !!(RUBY_PLATFORM =~ /mswin|win32|dos|mingw|cygwin/)
+ return !!(RUBY_PLATFORM =~ /mswin|win32|dos|mingw|cygwin/i)
+ end
+
+ # @return [TrueClass|FalseClass] true if running on Mac OS X platform
+ def is_darwin?
+ return !!(RUBY_PLATFORM =~ /darwin/i)
+ end
+
+ # @return [TrueClass|FalseClass] true if running on Linux platform
+ def is_linux?
+ return !!(RUBY_PLATFORM =~ /linux/i)
end
# Creates a null logger.
#
# @return [Logger] the null logger