⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.25
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
RDoc
/
Parser
/
C
/
Edit File: cdesc-C.ri
U:RDoc::NormalClass[iI"C:ETI"RDoc::Parser::C;TI"RDoc::Parser;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"HRDoc::Parser::C attempts to parse C extension files. It looks for ;TI"Kthe standard patterns that you find in extensions: +rb_define_class+, ;TI"G+rb_define_method+ and so on. It tries to find the corresponding ;TI"CC source for the methods and extract comments, but if we fail ;TI"we don't worry too much.;To:RDoc::Markup::BlankLine o; ;[ I"IThe comments associated with a Ruby method are extracted from the C ;TI"Fcomment block associated with the routine that _implements_ that ;TI"Bmethod, that is to say the method whose name is given in the ;TI";+rb_define_method+ call. For example, you might write:;T@o:RDoc::Markup::Verbatim;[I"/* ;TI"I * Returns a new array that is a one-dimensional flattening of this ;TI"J * array (recursively). That is, for every element that is an array, ;TI"1 * extract its elements into the new array. ;TI" * ;TI"3 * s = [ 1, 2, 3 ] #=> [1, 2, 3] ;TI"; * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] ;TI"O * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] ;TI"I * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ;TI" */ ;TI" static VALUE ;TI" rb_ary_flatten(VALUE ary) ;TI" { ;TI"! ary = rb_obj_dup(ary); ;TI"$ rb_ary_flatten_bang(ary); ;TI" return ary; ;TI" } ;TI" ;TI" ... ;TI" ;TI" void ;TI" Init_Array(void) ;TI" { ;TI" ... ;TI"C rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); ;T:@format0o; ;[ I"NHere RDoc will determine from the +rb_define_method+ line that there's a ;TI"Rmethod called "flatten" in class Array, and will look for the implementation ;TI"Lin the method +rb_ary_flatten+. It will then use the comment from that ;TI"Lmethod in the HTML output. This method must be in the same source file ;TI"as the +rb_define_method+.;T@o; ;[I"7The comment blocks may include special directives:;T@o:RDoc::Markup::List: @type: LABEL:@items[o:RDoc::Markup::ListItem:@label[I"Document-class: +name+;T;[o; ;[I"'Documentation for the named class.;T@o;;[I"Document-module: +name+;T;[o; ;[I"(Documentation for the named module.;T@o;;[I"Document-const: +name+;T;[o; ;[I"3Documentation for the named +rb_define_const+.;T@o; ;[I"NConstant values can be supplied on the first line of the comment like so:;T@o;;[I"6/* 300: The highest possible score in bowling */ ;TI"5rb_define_const(cFoo, "PERFECT", INT2FIX(300)); ;T;0o; ;[I"OThe value can contain internal colons so long as they are escaped with a \;T@o;;[I"Document-global: +name+;T;[o; ;[I"9Documentation for the named +rb_define_global_const+;T@o;;[I"Document-variable: +name+;T;[o; ;[I"5Documentation for the named +rb_define_variable+;T@o;;[I"$Document-method\: +method_name+;T;[o; ;[I"KDocumentation for the named method. Use this when the method name is ;TI"unambiguous.;T@o;;[I"6Document-method\: <tt>ClassName::method_name</tt>;T;[o; ;[I"MDocumentation for a singleton method in the given class. Use this when ;TI"(the method name alone is ambiguous.;T@o;;[I"5Document-method\: <tt>ClassName#method_name</tt>;T;[o; ;[I"PDocumentation for a instance method in the given class. Use this when the ;TI"$method name alone is ambiguous.;T@o;;[I"Document-attr: +name+;T;[o; ;[I"+Documentation for the named attribute.;T@o;;[I"/call-seq: <i>text up to an empty line</i>;T;[o; ;[I"OBecause C source doesn't give descriptive names to Ruby-level parameters, ;TI"9you need to document the calling sequence explicitly;T@o; ;[I"KIn addition, RDoc assumes by default that the C method implementing a ;TI"LRuby function is in the same source file as the rb_define_method call. ;TI"-If this isn't the case, add the comment:;T@o;;[I"-rb_define_method(....); // in filename ;T;0o; ;[I"MAs an example, we might have an extension that defines multiple classes ;TI"9in its Init_xxx method. We could document them using;T@o;;[I"/* ;TI"! * Document-class: MyClass ;TI" * ;TI"A * Encapsulate the writing and reading of the configuration ;TI" * file. ... ;TI" */ ;TI" ;TI"/* ;TI"$ * Document-method: read_value ;TI" * ;TI" * call-seq: ;TI"2 * cfg.read_value(key) -> value ;TI"2 * cfg.read_value(key} { |key| } -> value ;TI" * ;TI"H * Return the value corresponding to +key+ from the configuration. ;TI"? * In the second form, if the key isn't found, invoke the ;TI"$ * block and return its value. ;TI" */;T;0: @fileI"lib/rdoc/parser/c.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"classes;TI"R;T:publicFI"lib/rdoc/parser/c.rb;T[ I"content;TI"RW;T;F@�[ I"enclosure_dependencies;T@�;F@�[ I"known_classes;T@�;F@�[ I"missing_dependencies;T@�;F@�[ I"singleton_classes;T@�;F@�[ I"top_level;T@�;F@�[ [[I"RDoc::Text;To;;[ ;@�;0@�[[I" class;T[[;[[I"new;T@�[:protected[ [:private[ [I" instance;T[[;[$[I"add_alias;T@�[I"do_aliases;T@�[I" do_attrs;T@�[I"do_boot_defclass;T@�[I"do_classes_and_modules;T@�[I"do_constants;T@�[I"do_includes;T@�[I"do_methods;T@�[I"do_missing;T@�[I"find_alias_comment;T@�[I"find_attr_comment;T@�[I"find_body;T@�[I"find_class;T@�[I"find_class_comment;T@�[I"find_const_comment;T@�[I"find_modifiers;T@�[I"find_override_comment;T@�[I"gen_body_table;T@�[I"gen_const_table;T@�[I"handle_attr;T@�[I"handle_class_module;T@�[I"handle_constants;T@�[I"handle_ifdefs_in;T@�[I"handle_method;T@�[I"handle_singleton;T@�[I"handle_tab_width;T@�[I"load_variable_map;T@�[I"look_for_directives_in;T@�[I"rb_scan_args;T@�[I"remove_commented_out_lines;T@�[I" scan;T@�[;[ [;[ [[I" TSort;To;;[ ;@�;0@�[U:RDoc::Context::Section[i 0o;;[ ;0;0[@�@�cRDoc::TopLevel
Simpan