Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
RDoc
/
Parser
/
Ruby
/
//opt/alt/ruby21/share/ri/2.1.0/system/RDoc/Parser/Ruby/cdesc-Ruby.ri
U:RDoc::NormalClass[iI" Ruby:ETI"RDoc::Parser::Ruby;TI"RDoc::Parser;Fo:RDoc::Markup::Document:@parts[o;;[.o:RDoc::Markup::Paragraph;[I"KExtracts code elements from a source file returning a TopLevel object ;TI".containing the constituent file elements.;To:RDoc::Markup::BlankLine o; ;[I" This file is based on rtags;T@o; ;[I",RubyParser understands how to document:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"classes;To;;0;[o; ;[I"modules;To;;0;[o; ;[I"methods;To;;0;[o; ;[I"constants;To;;0;[o; ;[I"aliases;To;;0;[o; ;[I"private, public, protected;To;;0;[o; ;[I"2private_class_function, public_class_function;To;;0;[o; ;[I"module_function;To;;0;[o; ;[I"2attr, attr_reader, attr_writer, attr_accessor;To;;0;[o; ;[I".extra accessors given on the command line;To;;0;[o; ;[I"metaprogrammed methods;To;;0;[o; ;[I"require;To;;0;[o; ;[I"include;T@S:RDoc::Markup::Heading: leveli: textI"Method Arguments;T@o; ;[I"LThe parser extracts the arguments from the method definition. You can ;TI"Joverride this with a custom argument definition using the :call-seq: ;TI"directive:;T@o:RDoc::Markup::Verbatim;[I"## ;TI"F# This method can be called with a range or an offset and length ;TI"# ;TI"# :call-seq: ;TI"# my_method(Range) ;TI"## my_method(offset, length) ;TI" ;TI"def my_method(*args) ;TI" end ;T:@format0o; ;[ I"NThe parser extracts +yield+ expressions from method bodies to gather the ;TI"Oyielded argument names. If your method manually calls a block instead of ;TI"Hyielding or you want to override the discovered argument names use ;TI"the :yields: directive:;T@o;;[I"## ;TI"# My method is awesome ;TI" ;TI"3def my_method(&block) # :yields: happy, times ;TI" block.call 1, 2 ;TI" end ;T;0S;;i;I"Metaprogrammed Methods;T@o; ;[I"QTo pick up a metaprogrammed method, the parser looks for a comment starting ;TI"$with '##' before an identifier:;T@o;;[ I"## ;TI")# This is a meta-programmed method! ;TI" ;TI".add_my_method :meta_method, :arg1, :arg2 ;T;0o; ;[I"RThe parser looks at the token after the identifier to determine the name, in ;TI"Rthis example, :meta_method. If a name cannot be found, a warning is printed ;TI"and 'unknown is used.;T@o; ;[I"EYou can force the name of a method using the :method: directive:;T@o;;[I"## ;TI"# :method: some_method! ;T;0o; ;[I"RBy default, meta-methods are instance methods. To indicate that a method is ;TI"Ea singleton method instead use the :singleton-method: directive:;T@o;;[I"## ;TI"# :singleton-method: ;T;0o; ;[I"CYou can also use the :singleton-method: directive with a name:;T@o;;[I"## ;TI"'# :singleton-method: some_method! ;T;0o; ;[I"HYou can define arguments for metaprogrammed methods via either the ;TI",:call-seq:, :arg: or :args: directives.;T@o; ;[I";Additionally you can mark a method as an attribute by ;TI"Ousing :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like ;TI"(for :method:, the name is optional.;T@o;;[I"## ;TI""# :attr_reader: my_attr_name ;T;0S;;i;I""Hidden methods and attributes;T@o; ;[I"GYou can provide documentation for methods that don't appear using ;TI"<the :method:, :singleton-method: and :attr: directives:;T@o;;[I"## ;TI""# :attr_writer: ghost_writer ;TI"9# There is an attribute here, but you can't see it! ;TI" ;TI"## ;TI"# :method: ghost_method ;TI"5# There is a method here, but you can't see it! ;TI" ;TI"## ;TI".# this is a comment for a regular method ;TI" ;TI"def regular_method() end ;T;0o; ;[I"PNote that by default, the :method: directive will be ignored if there is a ;TI")standard rdocable item following it.;T: @fileI"lib/rdoc/parser/ruby.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [U:RDoc::Constant[i I"NORMAL;FI"RDoc::Parser::Ruby::NORMAL;T00o;;[o; ;[I"RDoc::NormalClass type;T;@�;0@�@cRDoc::NormalClass0U;[i I"SINGLE;FI"RDoc::Parser::Ruby::SINGLE;T00o;;[o; ;[I"RDoc::SingleClass type;T;@�;0@�@@�0[[I"RDoc::RubyToken;To;;[ ;@�;0I"lib/rdoc/parser/ruby.rb;T[I"RDoc::TokenStream;To;;[ ;@�;0@�[I"RDoc::Parser::RubyTools;To;;[ ;@�;0@�[[I" class;T[[:public[[I"new;T@�[:protected[ [:private[ [I" instance;T[[;[1[I"collect_first_comment;F@�[I" error;F@�[I" get_bool;F@�[I"get_class_or_module;F@�[I"get_class_specification;F@�[I"get_constant;F@�[I"&get_constant_with_optional_parens;F@�[I"get_symbol_or_name;F@�[I"look_for_directives_in;F@�[I"make_message;F@�[I"new_comment;F@�[I"parse_alias;F@�[I"parse_attr;F@�[I"parse_attr_accessor;F@�[I"parse_call_parameters;F@�[I"parse_class;F@�[I"parse_comment;F@�[I"parse_comment_tomdoc;F@�[I"parse_constant;F@�[I"parse_meta_attr;F@�[I"parse_meta_method;F@�[I"parse_method;F@�[I"parse_method_dummy;F@�[I"%parse_method_or_yield_parameters;F@�[I"parse_method_parameters;F@�[I"!parse_method_params_and_body;F@�[I"parse_module;F@�[I"parse_require;F@�[I"parse_rescue;F@�[I"parse_statements;F@�[I"parse_symbol_arg;F@�[I"parse_symbol_in_arg;F@�[I"parse_top_level_statements;F@�[I"parse_visibility;F@�[I"parse_yield;F@�[I"read_directive;F@�[I"!read_documentation_modifiers;F@�[I"remove_private_comments;F@�[I" scan;F@�[I"skip_for_variable;F@�[I"skip_method;F@�[I"&skip_optional_do_after_expression;F@�[I"skip_tkspace_comment;F@�[I" warn;F@�[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@�@�cRDoc::TopLevel