Class: Bora::Cfn::ChangeSetAction
- Inherits:
-
Object
- Object
- Bora::Cfn::ChangeSetAction
- Defined in:
- lib/bora/cfn/change_set_action.rb
Instance Method Summary collapse
-
#initialize(action, replacement) ⇒ ChangeSetAction
constructor
A new instance of ChangeSetAction.
- #to_s ⇒ Object
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_s ⇒ Object
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 |