Module: Memoized::InstanceMethods

Defined in:
lib/memoized.rb

Instance Method Summary collapse

Instance Method Details

#unmemoize(method_name) ⇒ Object



90
91
92
# File 'lib/memoized.rb', line 90

def unmemoize(method_name)
  self.instance_variable_set(Memoized.ivar_name(method_name), nil)
end

#unmemoize_allObject



94
95
96
97
98
99
100
# File 'lib/memoized.rb', line 94

def unmemoize_all
  (methods + private_methods + protected_methods).each do |method|
    if method.to_s =~ /^_unmemoized_(.*)/
      unmemoize($1)
    end
  end
end