Class: OperatorRecordable::Configuration
- Inherits:
-
Object
- Object
- OperatorRecordable::Configuration
- Defined in:
- lib/operator_recordable/configuration.rb
Defined Under Namespace
Classes: Model
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #association_name_for(type) ⇒ Object
- #column_name_for(type) ⇒ Object
-
#initialize(config) ⇒ Configuration
constructor
A new instance of Configuration.
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
#store ⇒ Object (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 |