module RestClient::Platform

def self.jruby?

Returns:
  • (Boolean) -
def self.jruby?
  RUBY_PLATFORM == 'java'
end

def self.mac?

Returns:
  • (Boolean) -
def self.mac?
  RUBY_PLATFORM.include?('darwin')
end

def self.windows?

Returns:
  • (Boolean) -
def self.windows?
  # Ruby only sets File::ALT_SEPARATOR on Windows, and the Ruby standard
  # library uses that to test what platform it's on.
  !!File::ALT_SEPARATOR
end