class Aruba::Platforms::WindowsCommandString

This is a command which should be run

This adds `cmd.exec` in front of commmand

@private

Public Class Methods

new(cmd) click to toggle source
# File lib/aruba/platforms/windows_command_string.rb, line 13
def initialize(cmd)
  __setobj__ format('%s /c "%s"', Aruba.platform.which('cmd.exe'), cmd)
end

Public Instance Methods

inspect()
Alias for: to_s
to_a() click to toggle source

Convert to array

# File lib/aruba/platforms/windows_command_string.rb, line 18
def to_a
  Shellwords.split( __getobj__.gsub('\', 'ARUBA_TMP_PATHSEPARATOR') ).
    map { |w| w.gsub('ARUBA_TMP_PATHSEPARATOR', '\') }
end
to_s() click to toggle source
# File lib/aruba/platforms/windows_command_string.rb, line 24
def to_s
  __getobj__.to_s
end
Also aliased as: inspect