Class: AttributeCustomization::LocalCache::NamespaceCache
- Inherits:
-
Struct
- Object
- Struct
- AttributeCustomization::LocalCache::NamespaceCache
- Includes:
- Traveller::LocalCache
- Defined in:
- app/models/attribute_customization/local_cache.rb
Instance Attribute Summary collapse
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Instance Method Summary collapse
Instance Attribute Details
#namespace ⇒ Object
Returns the value of attribute namespace
3 4 5 |
# File 'app/models/attribute_customization/local_cache.rb', line 3 def namespace @namespace end |
Instance Method Details
#cache_name ⇒ Object
10 11 12 |
# File 'app/models/attribute_customization/local_cache.rb', line 10 def cache_name "attribute_customizations_#{namespace}" end |
#fetch_value ⇒ Object
6 7 8 |
# File 'app/models/attribute_customization/local_cache.rb', line 6 def fetch_value AttributeCustomization.where(namespace: namespace).index_by(&:name) end |