Class Index [+]

Quicksearch

ActiveSupport::Memoizable::InstanceMethods

Public Class Methods

included(base) click to toggle source
    # File lib/active_support/memoizable.rb, line 11
11:       def self.included(base)
12:         base.class_eval do
13:           unless base.method_defined?(:freeze_without_memoizable)
14:             alias_method_chain :freeze, :memoizable
15:           end
16:         end
17:       end

Public Instance Methods

flush_cache(*syms) click to toggle source
    # 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
freeze_with_memoizable() click to toggle source
    # File lib/active_support/memoizable.rb, line 19
19:       def freeze_with_memoizable
20:         memoize_all unless frozen?
21:         freeze_without_memoizable
22:       end
memoize_all() click to toggle source
    # File lib/active_support/memoizable.rb, line 24
24:       def memoize_all
25:         prime_cache ".*"
26:       end
prime_cache(*syms) click to toggle source
    # 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
unmemoize_all() click to toggle source
    # File lib/active_support/memoizable.rb, line 28
28:       def unmemoize_all
29:         flush_cache ".*"
30:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.