Class: Commands::BootstrapActionCommand

Inherits:
Command show all
Defined in:
lib/commands.rb

Instance Attribute Summary collapse

Attributes inherited from Command

#arg, #commands, #description, #logger, #name

Instance Method Summary collapse

Methods inherited from Command

#enact, #get_field, #has_value, #have, #option, #require, #require_single_jobflow, #resolve, #validate

Constructor Details

#initialize(*args) ⇒ BootstrapActionCommand

Returns a new instance of BootstrapActionCommand.



952
953
954
955
# File 'lib/commands.rb', line 952

def initialize(*args)
  super(*args)
  @args = []
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



950
951
952
# File 'lib/commands.rb', line 950

def args
  @args
end

#bootstrap_nameObject

Returns the value of attribute bootstrap_name.



950
951
952
# File 'lib/commands.rb', line 950

def bootstrap_name
  @bootstrap_name
end

Instance Method Details

#bootstrap_action(index) ⇒ Object



957
958
959
960
961
962
963
964
965
966
# File 'lib/commands.rb', line 957

def bootstrap_action(index)
  action = {
    "Name" => get_field(:bootstrap_name, "Bootstrap Action #{index}"),
    "ScriptBootstrapAction" => {
      "Path" => @arg,
      "Args" => @args
    }
  }
  return action
end