Class: HecksAdapters::DynamoDB

Inherits:
Object
  • Object
show all
Defined in:
lib/hecks-adapters-dynamodb.rb,
lib/migrate.rb,
lib/drop_all.rb,
lib/repository.rb,
lib/commands/read.rb,
lib/commands/create.rb,
lib/commands/delete.rb,
lib/commands/update.rb

Overview

Hecks Repository interface

Defined Under Namespace

Modules: Commands Classes: DropAll, Migrate, Repository

Instance Method Summary collapse

Constructor Details

#initialize(domain:) ⇒ DynamoDB

Returns a new instance of DynamoDB.



11
12
13
# File 'lib/hecks-adapters-dynamodb.rb', line 11

def initialize(domain:)
  @domain = domain
end

Instance Method Details

#[](value) ⇒ Object

Look up a domain module hecks_app

Returns a domain module

eg: PizzaBuilder::Pizzas



21
22
23
# File 'lib/hecks-adapters-dynamodb.rb', line 21

def [](value)
  Repository.new(DOMAIN[value.to_s.titleize.to_sym].head)
end