lib/launcher/stacks.rb
def all_statuses(&block)
      statuses = []
      each { |stack| statuses << status(stack) }
      statuses.each &block if block
      return statuses
    end
# Return a status Array for each Cloudformation currently on AWS.
# The status for each Stack is returned as a Hash.
# You can either iterate over each status by passing in a block, or
# return the array of all statuses.
#
# @example Getting the name and status for each Cloudformation
#   Launcher::Stacks.new.all_statuses do |status|
#     puts "#{status[:name]} is in state #{status[:status]}"
#   end
#
# @return [Array] array of Hash objects containing information about the status of each stack.
Return a status Array for each Cloudformation currently on AWS.
The status for each Stack is returned as a Hash.
You can either iterate over each status by passing in a block, or
return the array of all statuses.
Return a status Array for each Cloudformation currently on AWS . The status for each Stack is returned as a Hash . You can either iterate over each status by passing in a block or return the array of all statuses .
def all_statuses(&block)
      statuses = []
      each { |stack| statuses << status(stack) }
      statuses.each &block if block
      return statuses
    end
def all_statuses ( & block ) statuses = [ ] each { | stack | statuses << status ( stack ) } statuses . each & block if block return statuses end
Return a status Array for each Cloudformation currently on AWS.
Return a status Array for each Cloudformation currently on AWS .
array of Hash objects containing information about the status of each stack.
array of Hash objects containing information about the status of each stack .
Array
block
example
Getting the name and status for each Cloudformation Launcher::Stacks.new.all_statuses do |status| puts "#{status[:name]} is in state #{status[:status]}" end
Getting the name and status for each Cloudformation Launcher :: Stacks . new . all_statuses do |status| puts " # { status [ : name ] } is in state # { status [ : status ] } " end