Module: CustomFragmentCache::Logic::ClassMethods
- Defined in:
- lib/custom_fragment_cache/logic.rb
Instance Method Summary collapse
- #add_fragment_cache(fragment_cache) ⇒ Object
- #define_cache_fragment(name, opts = {}) ⇒ Object
- #fragment_caches ⇒ Object
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_caches ⇒ Object
46 47 48 |
# File 'lib/custom_fragment_cache/logic.rb', line 46 def fragment_caches @fragment_caches || [] end |