class HecksAdapters::DynamoDB::DropAll
Drop all tables!
Attributes
client[R]
tables[R]
Public Class Methods
new(client:, domain:)
click to toggle source
# File lib/drop_all.rb, line 5 def initialize(client:, domain:) @client = client @domain = domain load(domain.spec_path) end
Public Instance Methods
call()
click to toggle source
# File lib/drop_all.rb, line 11 def call list_tables drop_tables self end
result()
click to toggle source
# File lib/drop_all.rb, line 17 def result { tables: @tables } end
Private Instance Methods
drop_tables()
click to toggle source
# File lib/drop_all.rb, line 29 def drop_tables @tables.each do |table| client.delete_table({table_name: table}) end end
list_tables()
click to toggle source
# File lib/drop_all.rb, line 25 def list_tables @tables = client.list_tables.table_names end