Class: Aruba::Platforms::WindowsCommandString

Inherits:
Object
  • Object
show all
Defined in:
lib/aruba/platforms/windows_command_string.rb

Overview

This is a command which should be run

This adds ‘cmd.exec` in front of commmand

Instance Method Summary collapse

Constructor Details

#initialize(command, *arguments) ⇒ WindowsCommandString

Returns a new instance of WindowsCommandString.



11
12
13
14
# File 'lib/aruba/platforms/windows_command_string.rb', line 11

def initialize(command, *arguments)
  @command = command
  @arguments = arguments
end

Instance Method Details

#to_aObject

Convert to array



17
18
19
# File 'lib/aruba/platforms/windows_command_string.rb', line 17

def to_a
  [cmd_path, "/c", [escaped_command, *escaped_arguments].join(" ")]
end