class Moonshot::StackParameterPrinter
Displays information about existing stack parameters to the user, with information on what a stack update would do.
Public Class Methods
new(stack, table)
click to toggle source
# File lib/moonshot/stack_parameter_printer.rb, line 5 def initialize(stack, table) @stack = stack @table = table end
Public Instance Methods
format_value(value)
click to toggle source
# File lib/moonshot/stack_parameter_printer.rb, line 19 def format_value(value) if value.size > 60 value[0..60] + '...' else value end end
print()
click to toggle source
# File lib/moonshot/stack_parameter_printer.rb, line 10 def print p_table = @table.add_leaf('Stack Parameters') rows = @stack.parameters.sort.map do |key, value| ["#{key}:", format_value(value)] end p_table.add_table(rows) end