class HecksAdapters::DynamoDB::Commands::Delete

Delete a resource on Dynamo DB

Attributes

client[R]
head[R]
query[R]

Public Class Methods

new(query, head, client) click to toggle source
# File lib/commands/delete.rb, line 6
def initialize(query, head, client)
  @head = head
  @query = query
  @client = client
end

Public Instance Methods

call() click to toggle source
# File lib/commands/delete.rb, line 12
def call
  delete_item
  self
end

Private Instance Methods

delete_item() click to toggle source
# File lib/commands/delete.rb, line 21
def delete_item
  client.delete_item(key: query, table_name: head.name)
end