| Class | ActsAsFerret::BlankSlate |
| In: |
lib/blank_slate.rb
|
| Parent: | ::BlankSlate |
BlankSlate provides an abstract base class with no predefined methods (except for __send__ and __id__). BlankSlate is useful as a base class when writing classes that depend upon method_missing (e.g. dynamic proxies).
Hide the method named name in the BlankSlate class. Don‘t hide instance_eval or any method beginning with "__".
# File lib/blank_slate.rb, line 30
30: def hide(name)
31: if instance_methods.include?(name.to_s) and name !~ /^(__|instance_eval|methods)/
32: @hidden_methods ||= {}
33: @hidden_methods[name.to_sym] = instance_method(name)
34: undef_method name
35: end
36: end