D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
RDoc
/
Parser
/
Ruby
/
Filename :
cdesc-Ruby.ri
back
Copy
U:RDoc::NormalClass[iI" Ruby:ETI"RDoc::Parser::Ruby;TI"RDoc::Parser;To: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"&private_constant, public_constant;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;TI"RDoc::Parser::Ruby::NORMAL;T:public0o;;[o; ;[I"RDoc::NormalClass type;T;@�;0@�@cRDoc::NormalClass0U;[i I"SINGLE;TI"RDoc::Parser::Ruby::SINGLE;T;0o;;[o; ;[I"RDoc::SingleClass type;T;@�;0@�@@�0[[I"RDoc::TokenStream;To;;[ ;@�;0I"lib/rdoc/parser/ruby.rb;T[I"RDoc::Parser::RubyTools;To;;[ ;@�;0@�[[I" class;T[[;[[I"new;T@�[:protected[ [:private[ [I" instance;T[[;[6[I"collect_first_comment;T@�[I" error;T@�[I" get_bool;T@�[I"get_class_or_module;T@�[I"get_class_specification;T@�[I"get_constant;T@�[I"-get_included_module_with_optional_parens;T@�[I"get_symbol_or_name;T@�[I"look_for_directives_in;T@�[I"make_message;T@�[I"new_comment;T@�[I"parse_alias;T@�[I"parse_attr;T@�[I"parse_attr_accessor;T@�[I"parse_call_parameters;T@�[I"parse_class;T@�[I"parse_class_regular;T@�[I"parse_comment;T@�[I"parse_comment_ghost;T@�[I"parse_comment_tomdoc;T@�[I"parse_constant;T@�[I"parse_constant_visibility;T@�[I"parse_meta_attr;T@�[I"parse_meta_method;T@�[I"parse_method;T@�[I"parse_method_dummy;T@�[I"%parse_method_or_yield_parameters;T@�[I"parse_method_parameters;T@�[I"!parse_method_params_and_body;T@�[I"parse_module;T@�[I"parse_require;T@�[I"parse_rescue;T@�[I"parse_statements;T@�[I"parse_symbol_arg;T@�[I"parse_symbol_in_arg;T@�[I"parse_top_level_statements;T@�[I"parse_visibility;T@�[I"parse_yield;T@�[I"read_directive;T@�[I"!read_documentation_modifiers;T@�[I"retrieve_comment_body;T@�[I" scan;T@�[I"skip_for_variable;T@�[I"skip_method;T@�[I"&skip_optional_do_after_expression;T@�[I"skip_parentheses;T@�[I"skip_tkspace_comment;T@�[I"tk_nl?;T@�[I" warn;T@�[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@�@�cRDoc::TopLevel