class Kitchen::LoginCommand

Value object to track a shell command that will be passed to Kernel.exec for execution.

@author Fletcher Nichol <fnichol@nichol.ca>

Attributes

arguments[R]

@return [Array] array of arguments to the command

command[R]

@return [String] login command

options[R]

@return [Hash] options hash, passed to `Kernel#exec`

Public Class Methods

new(command, arguments, options = {}) click to toggle source

Constructs a new LoginCommand instance.

@param command [String] command @param arguments [Array] array of arguments to the command @param options [Hash] options hash, passed to `Kernel#exec` @see www.ruby-doc.org/core-2.1.2/Kernel.html#method-i-exec

# File lib/kitchen/login_command.rb, line 39
def initialize(command, arguments, options = {})
  @command = command
  @arguments = Array(arguments)
  @options = options
end

Public Instance Methods

exec_args() click to toggle source
# File lib/kitchen/login_command.rb, line 45
def exec_args
  [command, *arguments, options]
end