Class: Hpricot::BlankSlate
Overview
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).
Direct Known Subclasses
Class Method Summary collapse
-
.hide(name) ⇒ Object
Hide the method named
name
in the BlankSlate class.
Class Method Details
.hide(name) ⇒ Object
Hide the method named name
in the BlankSlate class. Don’t hide instance_eval
or any method beginning with “__”.
22 23 24 25 26 |
# File 'lib/ext/hpricot/blankslate.rb', line 22 def hide(name) undef_method name if instance_methods.include?(name) and name !~ /^(__|instance_eval|object_id)/ end |