Module: Commutator::Model::TableConfiguration::ClassMethods

Defined in:
lib/commutator/model/table_configuration.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#primary_key_hash_nameObject (readonly)

Returns the value of attribute primary_key_hash_name.



34
35
36
# File 'lib/commutator/model/table_configuration.rb', line 34

def primary_key_hash_name
  @primary_key_hash_name
end

#primary_key_range_nameObject (readonly)

Returns the value of attribute primary_key_range_name.



34
35
36
# File 'lib/commutator/model/table_configuration.rb', line 34

def primary_key_range_name
  @primary_key_range_name
end

Instance Method Details

#primary_key(options = {}) ⇒ Object



37
38
39
40
# File 'lib/commutator/model/table_configuration.rb', line 37

def primary_key(options = {})
  @primary_key_hash_name = options[:hash]
  @primary_key_range_name = options[:range]
end

#table_name(table_name = nil) ⇒ Object



42
43
44
45
46
# File 'lib/commutator/model/table_configuration.rb', line 42

def table_name(table_name = nil)
  return @table_name unless table_name.present?

  @table_name = table_name
end