Class: CycloneLariat::Presenters::Topics

Inherits:
Object
  • Object
show all
Defined in:
lib/cyclone_lariat/presenters/topics.rb

Constant Summary collapse

HEADS =
%w[valid region account_id name instance kind publisher type fifo].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(topics) ⇒ Object



10
11
12
# File 'lib/cyclone_lariat/presenters/topics.rb', line 10

def self.call(topics)
  new.call(topics)
end

Instance Method Details

#call(topics) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/cyclone_lariat/presenters/topics.rb', line 14

def call(topics)
  rows = []
  topics.each do |topic|
    rows << row(topic)
  end

  Terminal::Table.new rows: rows, headings: HEADS
end