mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Module extended doc by @PragTob [fixes GH-335]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7eeb65397d
commit
331f22cd30
1 changed files with 20 additions and 2 deletions
22
object.c
22
object.c
|
@ -806,12 +806,30 @@ rb_obj_tap(VALUE obj)
|
||||||
* Undefining one
|
* Undefining one
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Document-method: extended
|
||||||
|
*
|
||||||
|
* call-seq:
|
||||||
|
* extended(othermod)
|
||||||
|
*
|
||||||
|
* The equivalent of <tt>included</tt>, but for extended modules.
|
||||||
|
*
|
||||||
|
* module A
|
||||||
|
* def self.extended(mod)
|
||||||
|
* puts "#{self} extended in #{mod}"
|
||||||
|
* end
|
||||||
|
* end
|
||||||
|
* module Enumerable
|
||||||
|
* extend A
|
||||||
|
* end
|
||||||
|
* # => prints "A extended in Enumerable"
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Document-method: included
|
* Document-method: included
|
||||||
*
|
*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* included( othermod )
|
* included(othermod)
|
||||||
*
|
*
|
||||||
* Callback invoked whenever the receiver is included in another
|
* Callback invoked whenever the receiver is included in another
|
||||||
* module or class. This should be used in preference to
|
* module or class. This should be used in preference to
|
||||||
|
@ -833,7 +851,7 @@ rb_obj_tap(VALUE obj)
|
||||||
* Document-method: prepended
|
* Document-method: prepended
|
||||||
*
|
*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* prepended( othermod )
|
* prepended(othermod)
|
||||||
*
|
*
|
||||||
* The equivalent of <tt>included</tt>, but for prepended modules.
|
* The equivalent of <tt>included</tt>, but for prepended modules.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue