Class: Dynamodb::Api::Adapter
- Inherits:
-
Object
- Object
- Dynamodb::Api::Adapter
- Defined in:
- lib/dynamodb/api/adapter.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#_client ⇒ Object
readonly
Returns the value of attribute _client.
Class Method Summary collapse
Instance Attribute Details
#_client ⇒ Object (readonly)
Returns the value of attribute _client.
4 5 6 |
# File 'lib/dynamodb/api/adapter.rb', line 4 def _client @_client end |
Class Method Details
.client ⇒ Object
6 7 8 |
# File 'lib/dynamodb/api/adapter.rb', line 6 def self.client @_client ||= Aws::DynamoDB::Client.new(connect_config) end |
.connect_config ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dynamodb/api/adapter.rb', line 10 def self.connect_config config_keys = %w(endpoint access_key_id secret_access_key region) @connect_hash = {} config_keys.each do |config_key| if Dynamodb::Api::Config.send("#{config_key}?") @connect_hash[config_key.to_sym] = Dynamodb::Api::Config.send(config_key) end end @connect_hash end |