Class: Knife::Clc::Bootstrap::Methods::AsyncWindowsPackage

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

Constant Summary collapse

COMBINED_SCRIPT_PATH =
'C:/bootstrap.bat'
LINES_PER_PARTIAL_SCRIPT =
100

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ AsyncWindowsPackage

Returns a new instance of AsyncWindowsPackage.



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

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.



11
12
13
# File 'lib/knife-clc/bootstrap/methods/async_windows_package.rb', line 11

def config
  @config
end

#subcommand_loaderObject (readonly)

Returns the value of attribute subcommand_loader.



11
12
13
# File 'lib/knife-clc/bootstrap/methods/async_windows_package.rb', line 11

def subcommand_loader
  @subcommand_loader
end

Instance Method Details

#execute(launch_parameters) ⇒ Object



18
19
20
21
# File 'lib/knife-clc/bootstrap/methods/async_windows_package.rb', line 18

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