Sha256: 77862c9eb36e8f2a6910616b59c38b8f79537b1c65fbfed787eb25253cdccfea
Contents?: true
Size: 808 Bytes
Versions: 10
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true require 'terminal-table' module CycloneLariat module Presenters class Queues HEADS = %w[valid region account_id name instance kind publisher type destination fifo].freeze def self.call(queues) new.call(queues) end def call(queues) rows = [] queues.each do |queue| rows << row(queue) end Terminal::Table.new rows: rows, headings: HEADS end private def row(queue) [ queue.custom? ? 'custom' : 'standard', queue.region, queue.account_id, queue.name, queue.instance, queue.kind, queue.publisher, queue.type, queue.dest, queue.fifo ] end end end end
Version data entries
10 entries across 10 versions & 1 rubygems