Module: DynamodbModel::DbConfig
- Included in:
- Item, Migration::Dsl, Migration::Executor, Migration::Generator
- Defined in:
- lib/dynamodb_model/db_config.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #db ⇒ Object
-
#namespaced_table_name ⇒ Object
NOTE: Class including DynamodbModel::DbConfig is required to have table_name method defined.
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/dynamodb_model/db_config.rb', line 7 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#db ⇒ Object
11 12 13 |
# File 'lib/dynamodb_model/db_config.rb', line 11 def db self.class.db end |
#namespaced_table_name ⇒ Object
NOTE: Class including DynamodbModel::DbConfig is required to have table_name method defined
16 17 18 |
# File 'lib/dynamodb_model/db_config.rb', line 16 def namespaced_table_name [self.class.table_namespace, table_name].reject {|s| s.nil? || s.empty?}.join('-') end |