Sha256: 3d1a5fdda10b85c69ef37c71af8a5342df46552b4f4dd30eb30a52027472bd4e

Contents?: true

Size: 361 Bytes

Versions: 7

Compression:

Stored size: 361 Bytes

Contents

require 'rbconfig'

module R10K
  module Util
    module Platform
      def self.platform
        if self.windows?
          :windows
        else
          :posix
        end
      end

      def self.windows?
        RbConfig::CONFIG['host_os'] =~ /mswin|win32|dos|mingw|cygwin/i
      end

      def self.posix?
        !windows?
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
r10k-2.1.1 lib/r10k/util/platform.rb
r10k-2.1.0 lib/r10k/util/platform.rb
r10k-2.0.3 lib/r10k/util/platform.rb
r10k-2.0.2 lib/r10k/util/platform.rb
r10k-2.0.1 lib/r10k/util/platform.rb
r10k-2.0.0 lib/r10k/util/platform.rb
r10k-1.5.1 lib/r10k/util/platform.rb