Class: StackMaster::Commands::Apply
- Inherits:
-
Object
- Object
- StackMaster::Commands::Apply
- Includes:
- Commander::UI, StackMaster::Command, Prompter
- Defined in:
- lib/stack_master/commands/apply.rb
Instance Method Summary collapse
-
#initialize(config, stack_definition, options = {}) ⇒ Apply
constructor
A new instance of Apply.
- #perform ⇒ Object
Methods included from Prompter
Methods included from StackMaster::Command
Constructor Details
#initialize(config, stack_definition, options = {}) ⇒ Apply
Returns a new instance of Apply.
8 9 10 11 12 13 |
# File 'lib/stack_master/commands/apply.rb', line 8 def initialize(config, stack_definition, = {}) @config = config @stack_definition = stack_definition @from_time = Time.now @updating = false end |
Instance Method Details
#perform ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/stack_master/commands/apply.rb', line 15 def perform diff_stacks unless ask?("Continue and apply the stack (y/n)? ") StackMaster.stdout.puts "Stack update aborted" return end begin return if stack_too_big create_or_update_stack tail_stack_events rescue StackMaster::CtrlC cancel end end |