Module: Erector::Caching::ClassMethods

Defined in:
lib/erector/caching.rb

Instance Method Summary collapse

Instance Method Details

#cachable(value = true) ⇒ Object


47
48
49
# File 'lib/erector/caching.rb', line 47

def cachable(value = true)
  @cachable = value
end

#cachable?Boolean


51
52
53
54
55
56
57
# File 'lib/erector/caching.rb', line 51

def cachable?
  if @cachable.nil?
    superclass.respond_to?(:cachable?) && superclass.cachable?
  else
    @cachable
  end
end

#cacheObject


59
60
61
# File 'lib/erector/caching.rb', line 59

def cache
  @@cache ||= nil
end

#cache=(c) ⇒ Object


63
64
65
# File 'lib/erector/caching.rb', line 63

def cache=(c)
  @@cache = c
end

#cacheable(value = true) ⇒ Object


43
44
45
# File 'lib/erector/caching.rb', line 43

def cacheable(value = true)
  @cachable = value
end