Class: Knife::Clc::Bootstrap::Methods::AsyncLinuxPackage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ AsyncLinuxPackage

Returns a new instance of AsyncLinuxPackage.



8
9
10
11
# File 'lib/knife-clc/bootstrap/methods/async_linux_package.rb', line 8

def initialize(params)
  @config = params.fetch(:config)
  @subcommand_loader = params.fetch(:subcommand_loader)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/knife-clc/bootstrap/methods/async_linux_package.rb', line 6

def config
  @config
end

#subcommand_loaderObject (readonly)

Returns the value of attribute subcommand_loader.



6
7
8
# File 'lib/knife-clc/bootstrap/methods/async_linux_package.rb', line 6

def subcommand_loader
  @subcommand_loader
end

Instance Method Details

#execute(launch_parameters) ⇒ Object



13
14
15
16
# File 'lib/knife-clc/bootstrap/methods/async_linux_package.rb', line 13

def execute(launch_parameters)
  launch_parameters['packages'] ||= []
  launch_parameters['packages'].concat(packages_for_async_bootstrap)
end