Sha256: 2f8d9e7f65ae6a6d0a3311cdeda7cf99fae01039bd3f15e56118c53e43211985
Contents?: true
Size: 665 Bytes
Versions: 9
Compression:
Stored size: 665 Bytes
Contents
module Dyna class DynamoDBWrapper include Logger::ClientHelper def initialize(ddb, options) @ddb = ddb @options = options.dup end def tables @ddb.list_tables.table_names.map do |table_name| describe_table = @ddb.describe_table(table_name: table_name).table Table.new(@ddb, describe_table, @options) end end def create(dsl) log(:info, 'Create Table', :cyan, "#{dsl.table_name}") unless @options.dry_run result = @ddb.create_table(dsl.symbolize_keys) @options.updated = true result end end def updated? !!@options.updated end end end
Version data entries
9 entries across 9 versions & 1 rubygems