Class: Himari::Aws::DynamodbStorage

Inherits:
Object
  • Object
show all
Includes:
Storages::Base
Defined in:
lib/himari/aws/dynamodb_storage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: ::Aws::DynamoDB::Client.new, table_name:) ⇒ DynamodbStorage

Returns a new instance of DynamodbStorage.

Parameters:

  • client (Aws::DynamoDB::Client) (defaults to: ::Aws::DynamoDB::Client.new)
  • table_name (String)

    name of DynamoDB table with hash=pk/range=sk key.



11
12
13
14
# File 'lib/himari/aws/dynamodb_storage.rb', line 11

def initialize(client: ::Aws::DynamoDB::Client.new, table_name:)
  @client = client
  @table_name = table_name
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



16
17
18
# File 'lib/himari/aws/dynamodb_storage.rb', line 16

def client
  @client
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



16
17
18
# File 'lib/himari/aws/dynamodb_storage.rb', line 16

def table_name
  @table_name
end