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