Sha256: 4b96c73e236729c122f121f0322f2541ce7bf09e35f8e41669c0fc8c7bc0c705

Contents?: true

Size: 555 Bytes

Versions: 12

Compression:

Stored size: 555 Bytes

Contents

require 'delegate'

# Aruba
module Aruba
  # Platforms
  module Platforms
    # This is a command which should be run
    #
    # This adds `cmd.exec` in front of commmand
    #
    # @private
    class WindowsCommandString < SimpleDelegator
      # Convert to array
      def to_a
        [cmd_path, '/c', __getobj__]
      end

      if RUBY_VERSION < '1.9'
        def to_s
          __getobj__.to_s
        end
        alias inspect to_s
      end

      private

      def cmd_path
        Aruba.platform.which('cmd.exe')
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
aruba-0.14.14 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.13 lib/aruba/platforms/windows_command_string.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/aruba-0.14.12/lib/aruba/platforms/windows_command_string.rb
aruba-0.14.12 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.11 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.10 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.9 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.8 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.7 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.6 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.5 lib/aruba/platforms/windows_command_string.rb
aruba-0.14.4 lib/aruba/platforms/windows_command_string.rb