Sha256: 1f02eeead852cfc80c4abeea7d9dba1878f045b269a3224b504a0aa38939794f

Contents?: true

Size: 306 Bytes

Versions: 20

Compression:

Stored size: 306 Bytes

Contents

# encoding: utf-8

module OS

  class << self
    def windows?
      (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
    end

    def mac?
     (/darwin/ =~ RUBY_PLATFORM) != nil
    end

    def unix?
      !OS.windows?
    end

    def linux?
      OS.unix? && !OS.mac?
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fir-cli-1.2.2 lib/fir/patches/os_patch.rb
fir-cli-1.2.1 lib/fir/patches/os_patch.rb
fir-cli-1.2.0 lib/fir/patches/os_patch.rb
fir-cli-1.1.9 lib/fir/patches/os_patch.rb
fir-cli-1.1.8 lib/fir/patches/os_patch.rb
fir-cli-1.1.7 lib/fir/patches/os_patch.rb
fir-cli-1.1.5 lib/fir/patches/os_patch.rb
fir-cli-1.1.4 lib/fir/patches/os_patch.rb
fir-cli-1.1.2 lib/fir/patches/os_patch.rb
fir-cli-1.1.1 lib/fir/patches/os_patch.rb
fir-cli-1.1.0 lib/fir/patches/os_patch.rb
fir-cli-1.0.8 lib/fir/patches/os_patch.rb
fir-cli-1.0.7 lib/fir/patches/os_patch.rb
fir-cli-1.0.6 lib/fir/patches/os_patch.rb
fir-cli-1.0.5 lib/fir/patches/os_patch.rb
fir-cli-1.0.4 lib/fir/patches/os_patch.rb
fir-cli-1.0.3 lib/fir/patches/os_patch.rb
fir-cli-1.0.2 lib/fir/patches/os_patch.rb
fir-cli-1.0.1 lib/fir/patches/os_patch.rb
fir-cli-1.0.0 lib/fir/patches/os_patch.rb