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



72
73
74
# File 'lib/card/view/cache.rb', line 72

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

#caching(voo) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/card/view/cache.rb', line 80

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

#caching?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/card/view/cache.rb', line 76

def caching?
  @caching
end