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



278
279
280
# File 'lib/card/view/cache.rb', line 278

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

#caching(voo) ⇒ Object



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

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

#caching?Boolean

Returns:

  • (Boolean)


282
283
284
# File 'lib/card/view/cache.rb', line 282

def caching?
  !@caching.nil?
end