Class: HecksAdapters::DynamoDB::Commands::Read

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/read.rb

Overview

Read a resource on DynamoDB

Instance Method Summary collapse

Constructor Details

#initialize(query, head, client) ⇒ Read

Returns a new instance of Read.



6
7
8
9
10
# File 'lib/commands/read.rb', line 6

def initialize(query, head, client)
  @client = client
  @query = query
  @head = head
end

Instance Method Details

#callObject



12
13
14
15
16
# File 'lib/commands/read.rb', line 12

def call
  result = get_item
  return nil if result.nil?
  PizzaBuilder::Domain::Pizzas.head.new(result)
end