Class: Kitchen::LoginCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/login_command.rb

Overview

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

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd_array, options = {}) ⇒ LoginCommand

Constructs a new LoginCommand instance.

Parameters:

  • cmd_array (Array)

    array of login command arguments

  • options (Hash) (defaults to: {})

    options hash, passed to Kernel#exec

See Also:



38
39
40
41
# File 'lib/kitchen/login_command.rb', line 38

def initialize(cmd_array, options = {})
  @cmd_array = Array(cmd_array)
  @options = options
end

Instance Attribute Details

#cmd_arrayArray (readonly)

Returns array of login command arguments.

Returns:

  • (Array)

    array of login command arguments



28
29
30
# File 'lib/kitchen/login_command.rb', line 28

def cmd_array
  @cmd_array
end

#optionsHash (readonly)

Returns options hash, passed to Kernel#exec.

Returns:

  • (Hash)

    options hash, passed to Kernel#exec



31
32
33
# File 'lib/kitchen/login_command.rb', line 31

def options
  @options
end