Class: HecksAdapters::DynamoDB::Commands::Read
- Inherits:
-
Object
- Object
- HecksAdapters::DynamoDB::Commands::Read
- Defined in:
- lib/commands/read.rb
Overview
Read a resource on DynamoDB
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(query, head, client) ⇒ Read
constructor
A new instance of Read.
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
#call ⇒ Object
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 |