Class: Commutator::SimpleClient

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/commutator/simple_client.rb

Overview

Provides an instance of ‘Aws::DynamoDB::Client` with conversions for passing Commutator objects to API operations.

‘:client => ` may be provided as an `Aws::DynamoDB::Client` instance otherwise this instantiates a `Aws::DynamoDB::Client` with the provided options

Instance Method Summary collapse

Constructor Details

#initialize(client: nil, **options) ⇒ SimpleClient

Returns a new instance of SimpleClient.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/commutator/simple_client.rb', line 8

def initialize(client: nil, **options)
  return super(client) if client

  defaults = {
    region: "us-east-1",
    endpoint: "https://dynamodb.us-east-1.amazonaws.com",
  }
  options = defaults.merge options

  super Aws::DynamoDB::Client.new(options)
end