Sha256: e7b657f09b75ea5d700e5aa2babf457edcf67af09a3c6e7dabc9e5f071e07e01

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

module TerraformDevKit
  class OS
    def self.host_os
      case RUBY_PLATFORM
      when /linux/
        'linux'
      when /darwin/
        'darwin'
      when /mingw/
        'windows'
      else
        raise 'Cannot determine OS'
      end
    end

    def self.env_path_separator
      case host_os
      when 'linux', 'darwin'
        ':'
      when 'windows'
        ';'
      end
    end

    def self.join_env_path(path1, path2)
      "#{path1}#{env_path_separator}#{path2}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
TerraformDevKit-0.1.0 lib/TerraformDevKit/os.rb