class AgileNotifier::OperatingSystem
Constants
- TYPE
Public Class Methods
is_linux?()
click to toggle source
# File lib/agile_notifier/operating_system.rb, line 11 def is_linux? match_os(/linux/) end
is_mac?()
click to toggle source
# File lib/agile_notifier/operating_system.rb, line 15 def is_mac? match_os(/darwin/) end
is_windows?()
click to toggle source
# File lib/agile_notifier/operating_system.rb, line 19 def is_windows? match_os(/mswin|mingw|cygwin|bccwin|wince|emx/) end
what()
click to toggle source
# File lib/agile_notifier/operating_system.rb, line 27 def what return TYPE[:lin] if is_linux? return TYPE[:mac] if is_mac? return TYPE[:win] if is_windows? return TYPE[:unknown] end
Private Class Methods
match_os(regex)
click to toggle source
# File lib/agile_notifier/operating_system.rb, line 23 def match_os(regex) !!RUBY_PLATFORM.match(regex) end