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