Module: Dynamodb::Connection
Instance Method Summary collapse
- #client ⇒ Object
- #client=(new_connection) ⇒ Object
- #config ⇒ Object
- #config=(client_config) ⇒ Object
- #reset_client ⇒ Object
- #resource ⇒ Object
- #resource=(new_resource) ⇒ Object
Instance Method Details
#client ⇒ Object
7 8 9 |
# File 'lib/dynamodb/connection.rb', line 7 def client @@client ||= Aws::DynamoDB::Client.new(config) end |
#client=(new_connection) ⇒ Object
11 12 13 |
# File 'lib/dynamodb/connection.rb', line 11 def client=(new_connection) @@client = new_connection end |
#config ⇒ Object
28 29 30 |
# File 'lib/dynamodb/connection.rb', line 28 def config @@config ||= { } end |
#config=(client_config) ⇒ Object
32 33 34 |
# File 'lib/dynamodb/connection.rb', line 32 def config=(client_config) @@config = client_config end |
#reset_client ⇒ Object
15 16 17 18 |
# File 'lib/dynamodb/connection.rb', line 15 def reset_client @@client = nil @@resource = nil end |
#resource ⇒ Object
20 21 22 |
# File 'lib/dynamodb/connection.rb', line 20 def resource @@resource ||= Aws::DynamoDB::Resource.new(client: client) end |
#resource=(new_resource) ⇒ Object
24 25 26 |
# File 'lib/dynamodb/connection.rb', line 24 def resource=(new_resource) @@resource = new_resource end |