Class: Knife::Clc::Bootstrap::SubcommandLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/knife-clc/bootstrap/subcommand_loader.rb

Instance Method Summary collapse

Instance Method Details

#load(params) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/knife-clc/bootstrap/subcommand_loader.rb', line 5

def load(params)
  klass = params.fetch(:class)
  config = params.fetch(:config)

  klass.load_deps
  command = klass.new
  command.config.merge!(config)
  command.configure_chef
  command
end