Module: CustomFragmentCache::Logic::ClassMethods

Defined in:
lib/custom_fragment_cache/logic.rb

Instance Method Summary collapse

Instance Method Details

#add_fragment_cache(fragment_cache) ⇒ Object



42
43
44
# File 'lib/custom_fragment_cache/logic.rb', line 42

def add_fragment_cache(fragment_cache)
  (@fragment_caches ||= []) << fragment_cache
end

#define_cache_fragment(name, opts = {}) ⇒ Object



50
51
52
53
# File 'lib/custom_fragment_cache/logic.rb', line 50

def define_cache_fragment(name, opts = {})
  fragment_cache = CustomFragmentCache::Fragment.new(name, opts)
  add_fragment_cache(fragment_cache)
end

#fragment_cachesObject



46
47
48
# File 'lib/custom_fragment_cache/logic.rb', line 46

def fragment_caches
  @fragment_caches || []
end