* object.c: Add doc for Module.prepended
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8222a78e28
commit
eff6180e53
20
object.c
20
object.c
@ -790,6 +790,26 @@ rb_obj_tap(VALUE obj)
|
|||||||
* module Enumerable
|
* module Enumerable
|
||||||
* include A
|
* include A
|
||||||
* end
|
* end
|
||||||
|
* # => prints "A included in Enumerable"
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Document-method: prepended
|
||||||
|
*
|
||||||
|
* call-seq:
|
||||||
|
* prepended( othermod )
|
||||||
|
*
|
||||||
|
* The equivalent of <tt>included</tt>, but for prepended modules.
|
||||||
|
*
|
||||||
|
* module A
|
||||||
|
* def self.prepended(mod)
|
||||||
|
* puts "#{self} prepended to #{mod}"
|
||||||
|
* end
|
||||||
|
* end
|
||||||
|
* module Enumerable
|
||||||
|
* prepend A
|
||||||
|
* end
|
||||||
|
* # => prints "A prepended to Enumerable"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user