Class: AttributeCustomization::LocalCache::NamespaceCache

Inherits:
Struct
  • Object
show all
Includes:
Traveller::LocalCache
Defined in:
app/models/attribute_customization/local_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#namespaceObject

Returns the value of attribute namespace

Returns:

  • (Object)

    the current value of namespace



3
4
5
# File 'app/models/attribute_customization/local_cache.rb', line 3

def namespace
  @namespace
end

Instance Method Details

#cache_nameObject



10
11
12
# File 'app/models/attribute_customization/local_cache.rb', line 10

def cache_name
  "attribute_customizations_#{namespace}"
end

#fetch_valueObject



6
7
8
# File 'app/models/attribute_customization/local_cache.rb', line 6

def fetch_value
  AttributeCustomization.where(namespace: namespace).index_by(&:name)
end