lib/dynamoid/adapter.rb in dynamoid-1.2.0 vs lib/dynamoid/adapter.rb in dynamoid-1.2.1
- old
+ new
@@ -130,18 +130,18 @@
tables << table_name
end
end
# @since 0.2.0
- def delete_table(table_name, *args)
+ def delete_table(table_name, options = {})
if tables.include?(table_name)
- benchmark('Delete Table') { adapter.delete_table(table_name, *args) }
+ benchmark('Delete Table') { adapter.delete_table(table_name, options) }
idx = tables.index(table_name)
tables.delete_at(idx)
end
end
- [:batch_get_item, :delete_item, :get_item, :list_tables, :put_item, :truncate].each do |m|
+ [:batch_get_item, :delete_item, :get_item, :list_tables, :put_item, :truncate, :batch_write_item, :batch_delete_item].each do |m|
# Method delegation with benchmark to the underlying adapter. Faster than relying on method_missing.
#
# @since 0.2.0
define_method(m) do |*args|
benchmark("#{m.to_s}", args) {adapter.send(m, *args)}