Sha256: b566b9e2e6f44fce02569a5f11d90a5aed2098af8fbd003e5a0cb1c8d2976721

Contents?: true

Size: 341 Bytes

Versions: 9

Compression:

Stored size: 341 Bytes

Contents

# coding: UTF-8

module Cocaine
  class OSDetector
    def java?
      arch =~ /java/
    end

    def unix?
      RbConfig::CONFIG['host_os'] !~ /mswin|mingw/
    end

    def windows?
      !unix?
    end

    def path_separator
      File::PATH_SEPARATOR
    end

    def arch
      RUBY_PLATFORM
    end
  end

  OS = OSDetector.new
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/cocaine-0.5.8/lib/cocaine/os_detector.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/cocaine-0.5.8/lib/cocaine/os_detector.rb
cocaine-0.5.8 lib/cocaine/os_detector.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/cocaine-0.5.7/lib/cocaine/os_detector.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/cocaine-0.5.7/lib/cocaine/os_detector.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/cocaine-0.5.7/lib/cocaine/os_detector.rb
cocaine-0.5.7 lib/cocaine/os_detector.rb
cocaine-0.5.6 lib/cocaine/os_detector.rb
cocaine-0.5.5 lib/cocaine/os_detector.rb