Class: SupportTable::Definition Private
- Inherits:
-
Object
- Object
- SupportTable::Definition
- Defined in:
- lib/support_table/definition.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class to define support table behavior on an ActiveRecord class.
Instance Attribute Summary collapse
- #klass ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(klass) ⇒ Definition
constructor
private
A new instance of Definition.
-
#support_table(data_file:, key_attribute:, attribute_helpers:, cache_by:, cache:, ttl:) ⇒ void
private
Setup a class to be a support table.
Constructor Details
#initialize(klass) ⇒ Definition
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Definition.
10 11 12 |
# File 'lib/support_table/definition.rb', line 10 def initialize(klass) @klass = klass end |
Instance Attribute Details
#klass ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/support_table/definition.rb', line 8 def klass @klass end |
Instance Method Details
#support_table(data_file:, key_attribute:, attribute_helpers:, cache_by:, cache:, ttl:) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Setup a class to be a support table.
24 25 26 27 28 29 30 |
# File 'lib/support_table/definition.rb', line 24 def support_table(data_file:, key_attribute:, attribute_helpers:, cache_by:, cache:, ttl:) include_modules set_key_attribute(key_attribute) set_attribute_helpers(attribute_helpers) set_data_file(data_file) setup_caching(cache_by, cache, ttl) end |