Sha256: 01b848c2acc97f12fee847b6a56dc5cedc38588ebb9c741a9aaa2e4dfa67b94b

Contents?: true

Size: 710 Bytes

Versions: 40

Compression:

Stored size: 710 Bytes

Contents

module RestClient
  module Platform
    # Return true if we are running on a darwin-based Ruby platform. This will
    # be false for jruby even on OS X.
    #
    # @return [Boolean]
    def self.mac_mri?
      RUBY_PLATFORM.include?('darwin')
    end

    # Return true if we are running on Windows.
    #
    # @return [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

    # Return true if we are running on jruby.
    #
    # @return [Boolean]
    #
    def self.jruby?
      # defined on mri >= 1.9
      RUBY_ENGINE == 'jruby'
    end
  end
end

Version data entries

40 entries across 38 versions & 8 rubygems

Version Path
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.7 vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.6 vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.5 vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.4 vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.2 vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-5.0.1 vendor/bundle/gems/rest-client-1.8.0/lib/restclient/platform.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/platform.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/rest-client-1.8.0/lib/restclient/platform.rb