Class: Bora::Cfn::ChangeSetAction

Inherits:
Object
  • Object
show all
Defined in:
lib/bora/cfn/change_set_action.rb

Instance Method Summary collapse

Constructor Details

#initialize(action, replacement) ⇒ ChangeSetAction

Returns a new instance of ChangeSetAction.



6
7
8
9
# File 'lib/bora/cfn/change_set_action.rb', line 6

def initialize(action, replacement)
  @action = action
  @replacement = replacement
end

Instance Method Details

#to_sObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/bora/cfn/change_set_action.rb', line 11

def to_s
  action_str = @action
  if @action == 'Modify'
    action_str =
      case @replacement
      when 'True' then 'Replace'
      when 'Conditional' then 'Replace (conditional)'
      else action_str
      end
  end
  action_str.colorize(color)
end