Class: Stackster::StackUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/stackster/stack/stack_updater.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ StackUpdater

Returns a new instance of StackUpdater.



6
7
8
9
10
11
12
# File 'lib/stackster/stack/stack_updater.rb', line 6

def initialize(args)
  @config = args[:config]
  @logger = @config.logger
  @entry = args[:entry]
  @name = args[:name]
  @template_body = args[:template_body]
end

Instance Method Details

#update_stack_if_parameters_changed(attributes) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/stackster/stack/stack_updater.rb', line 14

def update_stack_if_parameters_changed(attributes)
  if parameter_updated?(attributes)
    @logger.debug "Updated parameters found."
    update
  else
    @logger.debug "No Cloud Formation parameters require updating."
    false
  end
end