Sha256: 52efc99f6ebca4002551dcb8c810da9f7448fbac7e1cca1f6de8b85973767812

Contents?: true

Size: 444 Bytes

Versions: 4

Compression:

Stored size: 444 Bytes

Contents

module Percheron
  module CLI
    class ListCommand < AbstractCommand

      parameter 'STACK_NAME', 'stack name', required: false

      def execute
        stacks = if stack_name
          Stack.get(config, stack_name)
        else
          Stack.all(config)
        end

        stacks.each do |stack_name, stack|
          puts
          puts Percheron::Formatters::Stack::Table.new(stack).generate
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
percheron-0.5.0 lib/percheron/cli/list_command.rb
percheron-0.4.0 lib/percheron/cli/list_command.rb
percheron-0.3.2 lib/percheron/cli/list_command.rb
percheron-0.3.1 lib/percheron/cli/list_command.rb