Class: StackMaster::Commands::Status

Inherits:
Object
  • Object
show all
Includes:
StackMaster::Command
Defined in:
lib/stack_master/commands/status.rb

Instance Method Summary collapse

Methods included from StackMaster::Command

included

Constructor Details

#initialize(config, show_progress = true) ⇒ Status

Returns a new instance of Status.



6
7
8
9
# File 'lib/stack_master/commands/status.rb', line 6

def initialize(config, show_progress = true)
  @config = config
  @show_progress = show_progress
end

Instance Method Details

#performObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/stack_master/commands/status.rb', line 11

def perform
  progress if @show_progress
  status = @config.stacks.map do |stack_definition|
    status = get_status(stack_definition)
    progress.increment if @show_progress
    status
  end
  tp.set :io, StackMaster.stdout
  tp status
  StackMaster.stdout.puts " * No echo parameters can't be diffed"
end