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.



25
26
27
# File 'lib/commutator/model/table_configuration.rb', line 25

def primary_key_hash_name
  @primary_key_hash_name
end

#primary_key_range_nameObject (readonly)

Returns the value of attribute primary_key_range_name.



25
26
27
# File 'lib/commutator/model/table_configuration.rb', line 25

def primary_key_range_name
  @primary_key_range_name
end

Instance Method Details

#primary_key(options = {}) ⇒ Object



28
29
30
31
# File 'lib/commutator/model/table_configuration.rb', line 28

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

#table_name(table_name = nil) ⇒ Object



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

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

  @table_name = table_name
end