Module: Card::View::Cache::ClassMethods

Included in:
Card::View
Defined in:
lib/card/view/cache.rb

Overview

cache-related Card::View class methods

Instance Method Summary collapse

Instance Method Details

#cacheObject



280
281
282
# File 'lib/card/view/cache.rb', line 280

def cache
  Card::Cache[Card::View]
end

#caching(voo) ⇒ Object



288
289
290
291
292
293
294
# File 'lib/card/view/cache.rb', line 288

def caching voo
  old_caching = @caching
  @caching = voo
  yield
ensure
  @caching = old_caching
end

#caching?Boolean

Returns:

  • (Boolean)


284
285
286
# File 'lib/card/view/cache.rb', line 284

def caching?
  !@caching.nil?
end