Module: Redmine::Platform

Defined in:
lib/redmine/platform.rb

Class Method Summary collapse

Class Method Details

.mswin?Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/redmine/platform.rb', line 23

def mswin?
  (/(:?mswin|mingw)/.match?(RUBY_PLATFORM)) ||
     (RUBY_PLATFORM == 'java' && /windows/i.match?(ENV['OS'] || ENV['os']))
end

.osx?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/redmine/platform.rb', line 28

def osx?
  (/(:?darwin)/.match?(RUBY_PLATFORM))
end