Class: Kitchen::LoginCommand
- Inherits:
-
Object
- Object
- Kitchen::LoginCommand
- Defined in:
- lib/kitchen/login_command.rb
Overview
Value object to track a shell command that will be passed to Kernel.exec for execution.
Instance Attribute Summary collapse
-
#arguments ⇒ Array
readonly
Array of arguments to the command.
-
#command ⇒ String
readonly
Login command.
-
#options ⇒ Hash
readonly
Options hash, passed to ‘Kernel#exec`.
Instance Method Summary collapse
- #exec_args ⇒ Object
-
#initialize(command, arguments, options = {}) ⇒ LoginCommand
constructor
Constructs a new LoginCommand instance.
Constructor Details
#initialize(command, arguments, options = {}) ⇒ LoginCommand
Constructs a new LoginCommand instance.
40 41 42 43 44 |
# File 'lib/kitchen/login_command.rb', line 40 def initialize(command, arguments, = {}) @command = command @arguments = Array(arguments) @options = end |
Instance Attribute Details
#arguments ⇒ Array (readonly)
Returns array of arguments to the command.
29 30 31 |
# File 'lib/kitchen/login_command.rb', line 29 def arguments @arguments end |
#command ⇒ String (readonly)
Returns login command.
26 27 28 |
# File 'lib/kitchen/login_command.rb', line 26 def command @command end |
#options ⇒ Hash (readonly)
Returns options hash, passed to ‘Kernel#exec`.
32 33 34 |
# File 'lib/kitchen/login_command.rb', line 32 def @options end |
Instance Method Details
#exec_args ⇒ Object
46 47 48 |
# File 'lib/kitchen/login_command.rb', line 46 def exec_args [command, *arguments, ] end |