mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Module#method_undefined
This commit is contained in:
parent
478716f49a
commit
0261519f6e
1 changed files with 26 additions and 0 deletions
26
object.c
26
object.c
|
@ -980,6 +980,32 @@ rb_class_search_ancestor(VALUE cl, VALUE c)
|
|||
*
|
||||
*/
|
||||
|
||||
/* Document-method: method_undefined
|
||||
*
|
||||
* call-seq:
|
||||
* method_undefined(method_name)
|
||||
*
|
||||
* Invoked as a callback whenever an instance method is undefined from the
|
||||
* receiver.
|
||||
*
|
||||
* module Chatty
|
||||
* def self.method_undefined(method_name)
|
||||
* puts "Undefining #{method_name.inspect}"
|
||||
* end
|
||||
* def self.some_class_method() end
|
||||
* def some_instance_method() end
|
||||
* class << self
|
||||
* undef_method :some_class_method
|
||||
* end
|
||||
* undef_method :some_instance_method
|
||||
* end
|
||||
*
|
||||
* <em>produces:</em>
|
||||
*
|
||||
* Undefining :some_instance_method
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Document-method: singleton_method_added
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue