module RemindMeTo::OS

Public Instance Methods

has_notification_center?() click to toggle source
# File lib/remindmeto/os.rb, line 19
def has_notification_center?
  return false unless OS.mac?

  full_version = `/usr/bin/sw_vers -productVersion`.to_s.chomp
  version = /(10\.\d+)(\.\d+)?/.match(full_version).captures.first.to_f
  return (version >= 10.8)
end
linux?() click to toggle source
# File lib/remindmeto/os.rb, line 7
def linux?
  (/linux/ =~ RbConfig::CONFIG['host_os']) !=nil
end
mac?() click to toggle source
# File lib/remindmeto/os.rb, line 11
def mac?
  (/mac|darwin/ =~ RbConfig::CONFIG['host_os']) != nil
end
windows?() click to toggle source
# File lib/remindmeto/os.rb, line 15
def windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['host_os']) != nil
end