module Aws::Record
def self.extends_record?(klass)
- Api: - private
def self.extends_record?(klass) klass.superclass.include?(Aws::Record) end
def self.included(sub_class)
# Attribute definitions go here...
include Aws::Record
class MyTable
@example
method will then pull in the other default modules.
Usage of {Aws::Record} requires only that you include this module. This
def self.included(sub_class) sub_class.send(:extend, ClientConfiguration) sub_class.send(:extend, RecordClassMethods) sub_class.send(:include, Attributes) sub_class.send(:include, ItemOperations) sub_class.send(:include, DirtyTracking) sub_class.send(:include, Query) sub_class.send(:include, SecondaryIndexes) inherit_track_mutations(sub_class) if Aws::Record.extends_record?(sub_class) end
def self.inherit_track_mutations(klass)
- Api: - private
def self.inherit_track_mutations(klass) superclass_track_mutations = klass.superclass.instance_variable_get('@track_mutations') klass.instance_variable_set('@track_mutations', superclass_track_mutations) end
def dynamodb_client
def dynamodb_client self.class.dynamodb_client end