Class: Rom::Dynamo::Commands::Create

Inherits:
ROM::Commands::Create
  • Object
show all
Defined in:
lib/rom/dynamo/commands.rb

Overview

DynamoDB create command

Instance Method Summary collapse

Instance Method Details

#execute(tuple) ⇒ Object



8
9
10
11
12
13
# File 'lib/rom/dynamo/commands.rb', line 8

def execute(tuple)
  attributes = input[tuple]
  validator.call(attributes)
  relation.insert(attributes.to_h)
  []
end