module R10K::Util::Platform

Public Class Methods

jruby?() click to toggle source
# File lib/r10k/util/platform.rb, line 21
def self.jruby?
  RUBY_PLATFORM == "java"
end
platform() click to toggle source
# File lib/r10k/util/platform.rb, line 6
def self.platform
  # Test JRuby first to handle JRuby on Windows as well.
  if self.jruby?
    :jruby
  elsif self.windows?
    :windows
  else
    :posix
  end
end
posix?() click to toggle source
# File lib/r10k/util/platform.rb, line 25
def self.posix?
  !windows? && !jruby?
end
windows?() click to toggle source
# File lib/r10k/util/platform.rb, line 17
def self.windows?
  RbConfig::CONFIG['host_os'] =~ /mswin|win32|dos|mingw|cygwin/i
end