Class: Card::Rule::Cache
Overview
a cache of all card rules in the deck
Class Method Summary
collapse
Class Method Details
36
37
38
|
# File 'card/lib/card/rule/cache.rb', line 36
def clear
Card.cache.write cache_key, nil
end
|
32
33
34
|
# File 'card/lib/card/rule/cache.rb', line 32
def populate
Card.cache.write cache_key, lookup_hash
end
|
28
29
30
|
# File 'card/lib/card/rule/cache.rb', line 28
def read
Card.cache.read(cache_key) || populate
end
|