Hide the method named name in the BlankSlate class. Don’t hide instance_eval or any method beginning with "__".
Source Code
# File blankslate.rb, line 22 def hide(name) if instance_methods.include?(name.to_s) and name !~ /^(__|instance_eval)/ @hidden_methods ||= {} @hidden_methods[name.to_sym] = instance_method(name) undef_method name end end
<code/>and<pre/>for code samples.