Class: Kitchen::Command::Base

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/kitchen/command.rb

Overview

Base class for CLI commands.

Direct Known Subclasses

Action, Console, Diagnose, DriverDiscover, List, Login, Sink, Test

Instance Method Summary collapse

Constructor Details

#initialize(cmd_args, cmd_options, options = {}) ⇒ Base

Returns a new instance of Base.



32
33
34
35
36
37
38
39
40
# File 'lib/kitchen/command.rb', line 32

def initialize(cmd_args, cmd_options, options = {})
  @args = cmd_args
  @options = cmd_options
  @action = options.fetch(:action, nil)
  @help = options.fetch(:help, lambda { "No help provided" })
  @config = options.fetch(:config, nil)
  @loader = options.fetch(:loader, nil)
  @shell = options.fetch(:shell)
end