Class: Himari::Aws::DynamodbStorage
- Inherits:
-
Object
- Object
- Himari::Aws::DynamodbStorage
- Includes:
- Storages::Base
- Defined in:
- lib/himari/aws/dynamodb_storage.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #consistent_read? ⇒ Boolean
-
#initialize(client: ::Aws::DynamoDB::Client.new, table_name:, consistent_read: true) ⇒ DynamodbStorage
constructor
A new instance of DynamodbStorage.
Constructor Details
#initialize(client: ::Aws::DynamoDB::Client.new, table_name:, consistent_read: true) ⇒ DynamodbStorage
Returns a new instance of DynamodbStorage.
14 15 16 17 18 |
# File 'lib/himari/aws/dynamodb_storage.rb', line 14 def initialize(client: ::Aws::DynamoDB::Client.new, table_name:, consistent_read: true) @client = client @table_name = table_name @consistent_read = consistent_read end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
20 21 22 |
# File 'lib/himari/aws/dynamodb_storage.rb', line 20 def client @client end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
20 21 22 |
# File 'lib/himari/aws/dynamodb_storage.rb', line 20 def table_name @table_name end |
Instance Method Details
#consistent_read? ⇒ Boolean
22 |
# File 'lib/himari/aws/dynamodb_storage.rb', line 22 def consistent_read?; !!@consistent_read; end |