Sha256: f287700be035ff794e620d359249a0466c3f17c4f847275ad6f8e814a1b551f6

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

require "aruba/platforms/unix_platform"
require "aruba/platforms/windows_command_string"
require "aruba/platforms/windows_environment_variables"
require "aruba/platforms/windows_which"

# Aruba
module Aruba
  # This abstracts OS-specific things
  module Platforms
    # WARNING:
    # All methods found here are not considered part of the public API of aruba.
    #
    # Those methods can be changed at any time in the feature or removed without
    # any further notice.
    #
    # This includes all methods for the Windows platform
    #
    # @private
    class WindowsPlatform < UnixPlatform
      def self.match?
        Gem.win_platform?
      end

      # @see UnixPlatform#command_string
      def command_string
        WindowsCommandString
      end

      # @see UnixPlatform#environment_variables
      def environment_variables
        WindowsEnvironmentVariables
      end

      # @see UnixPlatform#which
      def which(program, path = ENV["PATH"])
        WindowsWhich.new.call(program, path)
      end

      def builtin_shell_commands
        %w(cd dir echo exit set type)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
aruba-2.1.0 lib/aruba/platforms/windows_platform.rb
aruba-2.0.1 lib/aruba/platforms/windows_platform.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/aruba-2.0.0/lib/aruba/platforms/windows_platform.rb
aruba-2.0.0 lib/aruba/platforms/windows_platform.rb