Class: CycloneLariat::Presenters::Subscriptions

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

Constant Summary collapse

HEADS =
%w[topic endpoint subscription_arn].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(subscriptions) ⇒ Object



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

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

Instance Method Details

#call(subscriptions) ⇒ Object



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

def call(subscriptions)
  rows = []
  subscriptions.each do |subscription|
    rows << row(subscription)
  end

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