Module: RestClient::Platform

### Home Classes Methods

### In Files

- lib/restclient/platform.rb

### Methods

- ::jruby?
- ::mac_mri?
- ::windows?

### Class/Module Index

Quicksearch

- RestClient
- RestClient::AbstractResponse
- RestClient::Exception
- RestClient::ExceptionWithResponse
- RestClient::Exceptions
- RestClient::MaxRedirectsReached
- RestClient::Payload
- RestClient::Payload::Base
- RestClient::Payload::Multipart
- RestClient::Payload::Streamed
- RestClient::Payload::UrlEncoded
- RestClient::Platform
- RestClient::RawResponse
- RestClient::Redirect
- RestClient::Request
- RestClient::Request::Redirect
- RestClient::Request::RequestFailed
- RestClient::RequestFailed
- RestClient::Resource
- RestClient::Response
- RestClient::ResponseForException
- RestClient::SSLCertificateNotVerified
- RestClient::ServerBrokeConnection
- RestClient::Windows
- RestClient::Windows::RootCerts
- RestClient::Windows::RootCerts::CERT_CONTEXT

No matching classes.

# RestClient::Platform

### Public Class Methods

jruby?() click to toggle source

Return true if we are running on jruby.

@return [Boolean]

    # File lib/restclient/platform.rb, line 25
    def self.jruby?
      # defined on mri >= 1.9
      RUBY_ENGINE == 'jruby'
    end

mac_mri?() click to toggle source

Return true if we are running on a darwin-based Ruby platform. This will be false for jruby even on OS X.

@return [Boolean]

    # File lib/restclient/platform.rb, line 7
    def self.mac_mri?
      RUBY_PLATFORM.include?('darwin')
    end

windows?() click to toggle source

Return true if we are running on Windows.

@return [Boolean]

    # File lib/restclient/platform.rb, line 15
    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

[Validate]

Generated with the Darkfish Rdoc Generator 2.