Class: StackMaster::Commands::Status
- Inherits:
-
Object
- Object
- StackMaster::Commands::Status
- Includes:
- StackMaster::Command, TerminalHelper
- Defined in:
- lib/stack_master/commands/status.rb
Instance Method Summary collapse
-
#initialize(config, show_progress = true) ⇒ Status
constructor
A new instance of Status.
- #perform ⇒ Object
Methods included from TerminalHelper
#unix_window_size, #window_size, #windows_window_size
Methods included from StackMaster::Command
Constructor Details
#initialize(config, show_progress = true) ⇒ Status
Returns a new instance of Status.
10 11 12 13 |
# File 'lib/stack_master/commands/status.rb', line 10 def initialize(config, show_progress = true) @config = config @show_progress = show_progress end |
Instance Method Details
#perform ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/stack_master/commands/status.rb', line 15 def perform progress if @show_progress status = @config.stacks.map do |stack_definition| stack_status = StackStatus.new(@config, stack_definition) progress.increment if @show_progress { region: stack_definition.region, stack_name: stack_definition.stack_name, stack_status: stack_status.status, different: stack_status., } end tp.set :max_width, self.window_size tp.set :io, StackMaster.stdout tp status StackMaster.stdout.puts " * No echo parameters can't be diffed" end |