class ROM::DynamoDB::Commands::Create

Public Instance Methods

execute(tuples) click to toggle source
# File lib/rom/dynamodb/commands/create.rb, line 7
def execute(tuples)
  tuples = tuples.is_a?(Array) ? tuples : [tuples]
  tuples.collect(&method(:with_tuple))
end
with_tuple(tuple) click to toggle source
# File lib/rom/dynamodb/commands/create.rb, line 12
def with_tuple(tuple)
  data = tuple.is_a?(Hash) ? tuple : tuple.to_h
  source.create(data)
end