зеркало из https://github.com/github/ruby.git
* 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:
Родитель
8222a78e28
Коммит
eff6180e53
20
object.c
20
object.c
|
@ -790,6 +790,26 @@ rb_obj_tap(VALUE obj)
|
|||
* module Enumerable
|
||||
* include A
|
||||
* 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"
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче