Class: Class
- Inherits:
-
Object
- Object
- Class
- Defined in:
- lib/ludy/class/undef_all_methods.rb
Instance Method Summary collapse
-
#undef_all_methods ⇒ Object
undefine all instance methods, used for delegation class.
Instance Method Details
#undef_all_methods ⇒ Object
undefine all instance methods, used for delegation class
4 5 6 7 8 |
# File 'lib/ludy/class/undef_all_methods.rb', line 4 def undef_all_methods instance_methods.each{ |m| undef_method m unless (m =~ /^__/ || m.to_sym == :object_id || m.to_sym == :public_send ) } end |