Class: DynamoDbStore
- Inherits:
-
Object
- Object
- DynamoDbStore
- Defined in:
- lib/dynamodb_framework/dynamodb_store.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize ⇒ DynamoDbStore
constructor
A new instance of DynamoDbStore.
Constructor Details
#initialize ⇒ DynamoDbStore
Returns a new instance of DynamoDbStore.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/dynamodb_framework/dynamodb_store.rb', line 4 def initialize region = ENV['DYNAMODB_REGION'] endpoint = ENV['DYNAMODB_ENDPOINT'] secret = ENV['DYNAMODB_SECRET'] key = ENV['DYNAMODB_ACCESS_KEY'] if endpoint != nil @client = Aws::DynamoDB::Client.new(region: region, endpoint: endpoint, secret_access_key: secret, access_key_id: key) else @client = Aws::DynamoDB::Client.new(region: region, secret_access_key: secret, access_key_id: key) end end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
2 3 4 |
# File 'lib/dynamodb_framework/dynamodb_store.rb', line 2 def client @client end |