Class: OperatorRecordable::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/operator_recordable/configuration.rb

Defined Under Namespace

Classes: Model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Configuration

Returns a new instance of Configuration.



9
10
11
12
# File 'lib/operator_recordable/configuration.rb', line 9

def initialize(config)
  @config = initialize_config(config)
  @store = initialize_store
end

Instance Attribute Details

#storeObject (readonly)

Returns the value of attribute store.



7
8
9
# File 'lib/operator_recordable/configuration.rb', line 7

def store
  @store
end

Instance Method Details

#association_name_for(type) ⇒ Object



26
27
28
# File 'lib/operator_recordable/configuration.rb', line 26

def association_name_for(type)
  config[:"#{type}_association_name"]
end

#column_name_for(type) ⇒ Object



22
23
24
# File 'lib/operator_recordable/configuration.rb', line 22

def column_name_for(type)
  config[:"#{type}_column_name"]
end