class HecksAdapters::DynamoDB::Repository
Use the Aws::DynamoDB::Client to persist your domain resources
Attributes
client[R]
head[R]
id[R]
Public Class Methods
new(head)
click to toggle source
# File lib/repository.rb, line 12 def initialize(head) @head = head @client = Aws::DynamoDB::Client.new(region: 'us-east-1') end
Public Instance Methods
create(args)
click to toggle source
# File lib/repository.rb, line 17 def create(args) Commands::Create.new(args, head, client).call end
delete(id)
click to toggle source
# File lib/repository.rb, line 21 def delete(id) Commands::Delete.new({id: id}, head, client).call end
read(id)
click to toggle source
# File lib/repository.rb, line 25 def read(id) Commands::Read.new(id, head, client).call end
update(id, attributes)
click to toggle source
# File lib/repository.rb, line 29 def update(id, attributes) Commands::Update.new(id, attributes, head, client).call end