本文簡要介紹ruby語言中 RDoc::Parser::C.find_class_comment
的用法。
用法
find_class_comment(class_name, class_mod)
在 Init_ class_name
(void)、Document-class class_name
(或模塊)注釋或 rb_define_class(或模塊)上方查找類或模塊文檔。如果在匹配的 Init_ 和 rb_define_class 上方提供了注釋,則使用 Init_ 注釋。
/* * This is a comment for Foo */ Init_Foo(void) { VALUE cFoo = rb_define_class("Foo", rb_cObject); } /* * Document-class: Foo * This is a comment for Foo */ Init_foo(void) { VALUE cFoo = rb_define_class("Foo", rb_cObject); } /* * This is a comment for Foo */ VALUE cFoo = rb_define_class("Foo", rb_cObject);
相關用法
- Ruby C.handle_constants用法及代碼示例
- Ruby C.look_for_directives_in用法及代碼示例
- Ruby CStructEntity.[]=用法及代碼示例
- Ruby Context.save_history=用法及代碼示例
- Ruby CSV.header_convert用法及代碼示例
- Ruby Constants模塊用法及代碼示例
- Ruby CMath tanh()用法及代碼示例
- Ruby CSV.skip_lines用法及代碼示例
- Ruby CGI.new用法及代碼示例
- Ruby Comparable.between?用法及代碼示例
- Ruby CGI.print用法及代碼示例
- Ruby CGI.http_header用法及代碼示例
- Ruby Class類用法及代碼示例
- Ruby CMath cos()用法及代碼示例
- Ruby Complex.arg用法及代碼示例
- Ruby CSV.table用法及代碼示例
- Ruby CSV.force_quotes?用法及代碼示例
- Ruby CParser模塊用法及代碼示例
- Ruby CSV.unconverted_fields?用法及代碼示例
- Ruby ComposedSet類用法及代碼示例
- Ruby Continuation類用法及代碼示例
- Ruby Closure類用法及代碼示例
- Ruby CStructEntity.[]用法及代碼示例
- Ruby Complex.abs2用法及代碼示例
- Ruby CSV類用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 C.find_class_comment。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。