module Aws::Record::ClientConfiguration

def _build_client(opts = {})

def _build_client(opts = {})
  provided_client = opts.delete(:client)
  client = provided_client || Aws::DynamoDB::Client.new(opts)
  client.config.user_agent_frameworks << 'aws-record'
  client
end

def configure_client(opts = {})

Options Hash: (**opts)
  • :client (Aws::DynamoDB::Client) -- allows you to pass in your

Parameters:
  • opts (Hash) -- the options you wish to use to create the client.
def configure_client(opts = {})
  # rubocop:disable Style/RedundantSelf
  @dynamodb_client = if self.class != Module && Aws::Record.extends_record?(self) && opts.empty? &&
                        self.superclass.instance_variable_get('@dynamodb_client')
                       self.superclass.instance_variable_get('@dynamodb_client')
                     else
                       _build_client(opts)
                     end
  # rubocop:enable Style/RedundantSelf
end

def dynamodb_client

Returns:
  • (Aws::DynamoDB::Client) - the Amazon DynamoDB client instance.
def dynamodb_client
  @dynamodb_client ||= configure_client
end