Class: Moonshot::StackOutputPrinter
- Inherits:
-
Object
- Object
- Moonshot::StackOutputPrinter
- Defined in:
- lib/moonshot/stack_output_printer.rb
Overview
Display the stack outputs to the user.
Instance Method Summary collapse
-
#initialize(stack, table) ⇒ StackOutputPrinter
constructor
A new instance of StackOutputPrinter.
- #print ⇒ Object
Constructor Details
#initialize(stack, table) ⇒ StackOutputPrinter
Returns a new instance of StackOutputPrinter.
6 7 8 9 |
# File 'lib/moonshot/stack_output_printer.rb', line 6 def initialize(stack, table) @stack = stack @table = table end |
Instance Method Details
#print ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/moonshot/stack_output_printer.rb', line 11 def print o_table = @table.add_leaf('Stack Outputs') rows = @stack.outputs.sort.map do |key, value| ["#{key}:", value] end o_table.add_table(rows) end |