module Dynorm::DbConfig

Public Instance Methods

db() click to toggle source
# File lib/dynorm/db_config.rb, line 7
def db
  @dynamodb = Aws::DynamoDB::Client.new(region: 'ap-northeast-1')
end
table(name)
Alias for: table_name
table_name(name) click to toggle source
# File lib/dynorm/db_config.rb, line 11
def table_name(name)
  name = name.to_s if name.class == Symbol
  @table_config = {}
  @table_config[:table_name] = name
  self
end
Also aliased as: table

Private Instance Methods

default_params() click to toggle source
# File lib/dynorm/db_config.rb, line 22
def default_params
  params = { table_name: @table_config[:table_name] }
  params
end