Define just the cattr_reader.

This will trim down the API and avoid some error that can be made
changing the cache object.
上级 d8dee214
......@@ -18,7 +18,8 @@ class Digestor
([@a-z"'][@a-z_\/\."']+) # the template name itself -- 2nd capture
/x
cattr_accessor(:cache) { Hash.new }
cattr_reader(:cache)
@@cache = Hash.new
def self.digest(name, format, finder, options = {})
cache["#{name}.#{format}"] ||= new(name, format, finder, options).digest
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册