Module: Memoized::InstanceMethods

Defined in:
lib/memoized.rb

Instance Method Summary collapse

Instance Method Details

#unmemoize(method_name) ⇒ Object



73
74
75
# File 'lib/memoized.rb', line 73

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

#unmemoize_allObject



77
78
79
80
81
82
83
# File 'lib/memoized.rb', line 77

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