# File lib/active_support/memoizable.rb, line 47
47: def flush_cache(*syms)
48: syms.each do |sym|
49: (methods + private_methods + protected_methods).each do |m|
50: if m.to_s =~ /^_unmemoized_(#{sym.to_s.gsub(/\?\Z/, '\?')})/
51: ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
52: instance_variable_get(ivar).clear if instance_variable_defined?(ivar)
53: end
54: end
55: end
56: end
# File lib/active_support/memoizable.rb, line 19
19: def freeze_with_memoizable
20: memoize_all unless frozen?
21: freeze_without_memoizable
22: end
# File lib/active_support/memoizable.rb, line 24
24: def memoize_all
25: prime_cache ".*"
26: end
# File lib/active_support/memoizable.rb, line 32
32: def prime_cache(*syms)
33: syms.each do |sym|
34: methods.each do |m|
35: if m.to_s =~ /^_unmemoized_(#{sym})/
36: if method(m).arity == 0
37: __send__($1)
38: else
39: ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
40: instance_variable_set(ivar, {})
41: end
42: end
43: end
44: end
45: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.