⚝
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
/
Markup
/
View File Name :
cdesc-Markup.ri
U:RDoc::NormalClass[iI"Markup:ETI"RDoc::Markup;TI"Object;To:RDoc::Markup::Document:@parts[o;;[�o:RDoc::Markup::Paragraph;[I"RRDoc::Markup parses plain text documents and attempts to decompose them into ;TI"Otheir constituent parts. Some of these parts are high-level: paragraphs, ;TI"Pchunks of verbatim text, list entries and the like. Other parts happen at ;TI"Rthe character level: a piece of bold text, a word in code font. This markup ;TI"Pis similar in spirit to that used on WikiWiki webs, where folks create web ;TI"2pages using a simple set of formatting rules.;To:RDoc::Markup::BlankLine o; ;[I"LRDoc::Markup and other markup formats do no output formatting, this is ;TI"7handled by the RDoc::Markup::Formatter subclasses.;T@S:RDoc::Markup::Heading: leveli: textI"Supported Formats;T@o; ;[I"QBesides the RDoc::Markup format, the following formats are built in to RDoc:;T@o:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I" markdown;T;[o; ;[I")The markdown format as described by ;TI"Khttp://daringfireball.net/projects/markdown/. See RDoc::Markdown for ;TI"4details on the parser and supported extensions.;To;;[I"rd;T;[o; ;[I"KThe rdtool format. See RDoc::RD for details on the parser and format.;To;;[I"tomdoc;T;[o; ;[I"MThe TomDoc format as described by http://tomdoc.org/. See RDoc::TomDoc ;TI"8for details on the parser and supported extensions.;T@o; ;[I"@You can choose a markup format using the following methods:;T@o;;;;[o;;[I"per project;T;[o; ;[I"EIf you build your documentation with rake use RDoc::Task#markup.;T@o; ;[I"1If you build your documentation by hand run:;T@o:RDoc::Markup::Verbatim;[I"8rdoc --markup your_favorite_format --write-options ;T:@format0o; ;[I"Jand commit <tt>.rdoc_options</tt> and ship it with your packaged gem.;To;;[I" per file;T;[o; ;[I"KAt the top of the file use the <tt>:markup:</tt> directive to set the ;TI"-default format for the rest of the file.;To;;[I"per comment;T;[o; ;[I"JUse the <tt>:markup:</tt> directive at the top of a comment you want ;TI"$to write in a different format.;T@S;;i; I"RDoc::Markup;T@o; ;[I"PRDoc::Markup is extensible at runtime: you can add \new markup elements to ;TI"=be recognized in the documents that RDoc::Markup parses.;T@o; ;[ I"PRDoc::Markup is intended to be the basis for a family of tools which share ;TI"Lthe common requirement that simple, plain-text should be rendered in a ;TI"Jvariety of different output formats and media. It is envisaged that ;TI"ORDoc::Markup could be the basis for formatting RDoc style comment blocks, ;TI"#Wiki entries, and online FAQs.;T@S;;i; I" Synopsis;T@o; ;[I"OThis code converts +input_string+ to HTML. The conversion takes place in ;TI"Mthe +convert+ method, so you can use the same RDoc::Markup converter to ;TI"$convert multiple input strings.;T@o;;[ I"require 'rdoc' ;TI" ;TI"5h = RDoc::Markup::ToHtml.new(RDoc::Options.new) ;TI" ;TI""puts h.convert(input_string) ;T;0o; ;[ I"DYou can extend the RDoc::Markup parser to recognize new markup ;TI"Rsequences, and to add regexp handling. Here we make WikiWords significant to ;TI"Rthe parser, and also make the sequences {word} and \<no>text...</no> signify ;TI"Jstrike-through text. We then subclass the HTML output class to deal ;TI"with these:;T@o;;[I"require 'rdoc' ;TI" ;TI"+class WikiHtml < RDoc::Markup::ToHtml ;TI"* def handle_regexp_WIKIWORD(target) ;TI"6 "<font color=red>" + target.text + "</font>" ;TI" end ;TI" end ;TI" ;TI"markup = RDoc::Markup.new ;TI"-markup.add_word_pair("{", "}", :STRIKE) ;TI"$markup.add_html("no", :STRIKE) ;TI" ;TI"Fmarkup.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) ;TI" ;TI"1wh = WikiHtml.new RDoc::Options.new, markup ;TI"2wh.add_tag(:STRIKE, "<strike>", "</strike>") ;TI" ;TI"1puts "<body>#{wh.convert ARGF.read}</body>" ;T;0S;;i; I" Encoding;T@o; ;[I"NWhere Encoding support is available, RDoc will automatically convert all ;TI"Pdocuments to the same output encoding. The output encoding can be set via ;TI"FRDoc::Options#encoding and defaults to Encoding.default_external.;T@S;;i; I"\RDoc Markup Reference;T@S;;i; I"Block Markup;T@S;;i; I"Paragraphs and Verbatim;T@o; ;[I"LThe markup engine looks for a document's natural left margin. This is ;TI"1used as the initial margin for the document.;T@o; ;[I"FConsecutive lines starting at this margin are considered to be a ;TI"0paragraph. Empty lines separate paragraphs.;T@o; ;[I"HAny line that starts to the right of the current margin is treated ;TI"9as verbatim text. This is useful for code listings:;T@o;;[I"3.times { puts "Ruby" } ;T;0o; ;[I"GIn verbatim text, two or more blank lines are collapsed into one, ;TI"*and trailing blank lines are removed:;T@o;;[ I"This is the first line ;TI" ;TI"(This is the second non-blank line, ;TI"/after 2 blank lines in the source markup. ;T;0o; ;[I"JThere were two trailing blank lines right above this paragraph, that ;TI"Hhave been removed. In addition, the verbatim text has been shifted ;TI"Hleft, so the amount of indentation of verbatim text is unimportant.;T@o; ;[ I"RFor HTML output RDoc makes a small effort to determine if a verbatim section ;TI"Pcontains Ruby source code. If so, the verbatim block will be marked up as ;TI"LHTML. Triggers include "def", "class", "module", "require", the "hash ;TI"4rocket"# (=>) or a block call with a parameter.;T@S;;i; I"Headers;T@o; ;[ I"<A line starting with an equal sign (=) is treated as a ;TI"Kheading. Level one headings have one equals sign, level two headings ;TI"?have two, and so on until level six, which is the maximum ;TI";(seven hyphens or more result in a level six heading).;T@o; ;[I"5For example, the above header was obtained with:;T@o;;[I"=== Headers ;T;0o; ;[I"QIn HTML output headers have an id matching their name. The above example's ;TI" HTML is:;T@o;;[I")<h3 id="label-Headers">Headers</h3> ;T;0o; ;[I"KIf a heading is inside a method body the id will be prefixed with the ;TI"Omethod's id. If the above header where in the documentation for a method ;TI" such as:;T@o;;[I"## ;TI"## This method does fun things ;TI"# ;TI"# = Example ;TI"# ;TI"-# Example of fun things goes here ... ;TI" ;TI"def do_fun_things ;TI" end ;T;0o; ;[I"The header's id would be:;T@o;;[I"@<h1 id="method-i-do_fun_things-label-Example">Example</h1> ;T;0o; ;[I"GThe label can be linked-to using <tt>SomeClass@Headers</tt>. See ;TI"5{Links}[RDoc::Markup@Links] for further details.;T@S;;i; I" Rules;T@o; ;[I"HA line starting with three or more hyphens (at the current indent) ;TI"!generates a horizontal rule.;T@o;;[I" --- ;T;0o; ;[I"produces:;T@S:RDoc::Markup::Rule:weighti@S;;i; I"Simple Lists;T@o; ;[ I"GIf a paragraph starts with a "*", "-", "<digit>." or "<letter>.", ;TI"Pthen it is taken to be the start of a list. The margin is increased to be ;TI"Jthe first non-space following the list start flag. Subsequent lines ;TI"Mshould be indented to this new margin until the list ends. For example:;T@o;;[I"/* this is a list with three paragraphs in ;TI"5 the first item. This is the first paragraph. ;TI" ;TI") And this is the second paragraph. ;TI" ;TI". 1. This is an indented, numbered list. ;TI"/ 2. This is the second item in that list ;TI" ;TI"7 This is the third conventional paragraph in the ;TI" first list item. ;TI" ;TI"4* This is the second item in the original list ;T;0o; ;[I"produces:;T@o;;:BULLET;[o;;0;[o; ;[I"-this is a list with three paragraphs in ;TI"2the first item. This is the first paragraph.;T@o; ;[I"&And this is the second paragraph.;T@o;;:NUMBER;[o;;0;[o; ;[I"(This is an indented, numbered list.;To;;0;[o; ;[I")This is the second item in that list;T@o; ;[I"5This is the third conventional paragraph in the ;TI"first list item.;T@o;;0;[o; ;[I"1This is the second item in the original list;T@S;;i; I"Labeled Lists;T@o; ;[I"HYou can also construct labeled lists, sometimes called description ;TI"Kor definition lists. Do this by putting the label in square brackets ;TI"!and indenting the list body:;T@o;;[ I"![cat] a small furry mammal ;TI"& that seems to sleep a lot ;TI" ;TI"*[ant] a little insect that is known ;TI" to enjoy picnics ;T;0o; ;[I"produces:;T@o;;: LABEL;[o;;[I"cat;T;[o; ;[I"a small furry mammal ;TI"that seems to sleep a lot;T@o;;[I"ant;T;[o; ;[I"#a little insect that is known ;TI"to enjoy picnics;T@o; ;[I"GIf you want the list bodies to line up to the left of the labels, ;TI"use two colons:;T@o;;[ I"!cat:: a small furry mammal ;TI"& that seems to sleep a lot ;TI" ;TI"*ant:: a little insect that is known ;TI" to enjoy picnics ;T;0o; ;[I"produces:;T@o;;;;[o;;[I"cat;T;[o; ;[I"a small furry mammal ;TI"that seems to sleep a lot;T@o;;[I"ant;T;[o; ;[I"#a little insect that is known ;TI"to enjoy picnics;T@o; ;[I"PNotice that blank lines right after the label are ignored in labeled lists:;T@o;;[I"[one] ;TI" ;TI" definition 1 ;TI" ;TI"[two] ;TI" ;TI" definition 2 ;T;0o; ;[I" produces the same output as;T@o;;[I"[one] definition 1 ;TI"[two] definition 2 ;T;0S;;i; I"Lists and Verbatim;T@o; ;[I"RIf you want to introduce a verbatim section right after a list, it has to be ;TI"Nless indented than the list item bodies, but more indented than the list ;TI"2label, letter, digit or bullet. For instance:;T@o;;[I"* point 1 ;TI" ;TI""* point 2, first paragraph ;TI" ;TI"# point 2, second paragraph ;TI"( verbatim text inside point 2 ;TI"" point 2, third paragraph ;TI"H verbatim text outside of the list (the list is therefore closed) ;TI"®ular paragraph after the list ;T;0o; ;[I"produces:;T@o;;;;[o;;0;[o; ;[I"point 1;T@o;;0;[ o; ;[I"point 2, first paragraph;T@o; ;[I"point 2, second paragraph;To;;[I""verbatim text inside point 2 ;T;0o; ;[I"point 2, third paragraph;To;;[I"Fverbatim text outside of the list (the list is therefore closed) ;T;0o; ;[I"%regular paragraph after the list;T@S;;i; I"Text Markup;T@S;;i; I""Bold, Italic, Typewriter Text;T@o; ;[I"DYou can use markup within text (except verbatim) to change the ;TI"Eappearance of parts of that text. Out of the box, RDoc::Markup ;TI",supports word-based and general markup.;T@o; ;[I"DWord-based markup uses flag characters around individual words:;T@o;;;;[o;;[I"<tt>\*_word_\*</tt>;T;[o; ;[I"%displays _word_ in a *bold* font;To;;[I"<tt>\__word_\_</tt>;T;[o; ;[I",displays _word_ in an _emphasized_ font;To;;[I"<tt>\+_word_\+</tt>;T;[o; ;[I"%displays _word_ in a +code+ font;T@o; ;[I"FGeneral markup affects text between a start delimiter and an end ;TI"Jdelimiter. Not surprisingly, these delimiters look like HTML markup.;T@o;;;;[o;;[I"<tt>\<b>_text_</b></tt>;T;[o; ;[I"%displays _text_ in a *bold* font;To;;[I"<tt>\<em>_text_</em></tt>;T;[o; ;[I"-displays _text_ in an _emphasized_ font ;TI"#(alternate tag: <tt>\<i></tt>);To;;[I"<tt>\<tt>_text_\</tt></tt>;T;[o; ;[I"&displays _text_ in a +code+ font ;TI"&(alternate tag: <tt>\<code></tt>);T@o; ;[ I"DUnlike conventional Wiki markup, general markup can cross line ;TI"Cboundaries. You can turn off the interpretation of markup by ;TI"Epreceding the first character with a backslash (see <i>Escaping ;TI"Text Markup</i>, below).;T@S;;i; I" Links;T@o; ;[I"KLinks to starting with +http:+, +https:+, +mailto:+, +ftp:+ or +www.+ ;TI"Qare recognized. An HTTP url that references an external image is converted ;TI""into an inline image element.;T@o; ;[ I"PClasses and methods will be automatically linked to their definition. For ;TI"Qexample, <tt>RDoc::Markup</tt> will link to this documentation. By default ;TI"Rmethods will only be automatically linked if they contain an <tt>_</tt> (all ;TI"Nmethods can be automatically linked through the <tt>--hyperlink-all</tt> ;TI"command line option).;T@o; ;[ I"MSingle-word methods can be linked by using the <tt>#</tt> character for ;TI"Finstance methods or <tt>::</tt> for class methods. For example, ;TI"R<tt>#convert</tt> links to #convert. A class or method may be combined like ;TI"#<tt>RDoc::Markup#convert</tt>.;T@o; ;[I"MA heading inside the documentation can be linked by following the class ;TI"7or method by an <tt>@</tt> then the heading name. ;TI"F<tt>RDoc::Markup@Links</tt> will link to this section like this: ;TI"QRDoc::Markup@Links. Spaces in headings with multiple words must be escaped ;TI"Fwith <tt>+</tt> like <tt>RDoc::Markup@Escaping+Text+Markup</tt>. ;TI"NPunctuation and other special characters must be escaped like CGI.escape.;T@o; ;[I"NThe <tt>@</tt> can also be used to link to sections. If a section and a ;TI"Gheading share the same name the section is preferred for the link.;T@o; ;[ I"QLinks can also be of the form <tt>label[url]</tt>, in which case +label+ is ;TI"Nused in the displayed text, and +url+ is used as the target. If +label+ ;TI"Rcontains multiple words, put it in braces: <tt>{multi word label}[url]</tt>. ;TI"LThe +url+ may be an +http:+-type link or a cross-reference to a class, ;TI"#module or method with a label.;T@o; ;[I"QLinks with the <code>rdoc-image:</code> scheme will create an image tag for ;TI";HTML output. Only fully-qualified URLs are supported.;T@o; ;[ I"QLinks with the <tt>rdoc-ref:</tt> scheme will link to the referenced class, ;TI"Jmodule, method, file, etc. If the referenced item is does not exist ;TI"Ono link will be generated and <tt>rdoc-ref:</tt> will be removed from the ;TI"resulting text.;T@o; ;[ I"ILinks starting with <tt>rdoc-label:label_name</tt> will link to the ;TI"E+label_name+. You can create a label for the current link (for ;TI"Hbidirectional links) by supplying a name for the current link like ;TI"0<tt>rdoc-label:label-other:label-mine</tt>.;T@o; ;[ I"PLinks starting with +link:+ refer to local files whose path is relative to ;TI"Ethe <tt>--op</tt> directory. Use <tt>rdoc-ref:</tt> instead of ;TI"N<tt>link:</tt> to link to files generated by RDoc as the link target may ;TI")be different across RDoc generators.;T@o; ;[I"Example links:;T@o;;[ I""https://github.com/ruby/rdoc ;TI"mailto:user@example.com ;TI"5{RDoc Documentation}[http://rdoc.rubyforge.org] ;TI"*{RDoc Markup}[rdoc-ref:RDoc::Markup] ;T;0S;;i; I"Escaping Text Markup;T@o; ;[ I"RText markup can be escaped with a backslash, as in \<tt>, which was obtained ;TI"Pwith <tt>\\<tt></tt>. Except in verbatim sections and between \<tt> tags, ;TI"Mto produce a backslash you have to double it unless it is followed by a ;TI"Qspace, tab or newline. Otherwise, the HTML formatter will discard it, as it ;TI"'is used to escape potential links:;T@o;;[ I"A* The \ must be doubled if not followed by white space: \\. ;TI"J* But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space. ;TI"9* This is a link to {ruby-lang}[www.ruby-lang.org]. ;TI"I* This is not a link, however: \{ruby-lang.org}[www.ruby-lang.org]. ;TI"7* This will not be linked to \RDoc::RDoc#document ;T;0o; ;[I"generates:;T@o;;;;[ o;;0;[o; ;[I">The \ must be doubled if not followed by white space: \\.;To;;0;[o; ;[I"GBut not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.;To;;0;[o; ;[I"5This is a link to {ruby-lang}[www.ruby-lang.org];To;;0;[o; ;[I"EThis is not a link, however: \{ruby-lang.org}[www.ruby-lang.org];To;;0;[o; ;[I"4This will not be linked to \RDoc::RDoc#document;T@o; ;[ I"PInside \<tt> tags, more precisely, leading backslashes are removed only if ;TI"Rfollowed by a markup character (<tt><*_+</tt>), a backslash, or a known link ;TI"Qreference (a known class or method). So in the example above, the backslash ;TI"Qof <tt>\S</tt> would be removed if there was a class or module named +S+ in ;TI"the current context.;T@o; ;[I"KThis behavior is inherited from RDoc version 1, and has been kept for ;TI"4compatibility with existing RDoc documentation.;T@S;;i; I"Conversion of characters;T@o; ;[I"SHTML will convert two/three dashes to an em-dash. Other common characters are ;TI"converted as well:;T@o;;[ I"em-dash:: -- or --- ;TI"ellipsis:: ... ;TI" ;TI"&single quotes:: 'text' or `text' ;TI"(double quotes:: "text" or ``text'' ;TI" ;TI"copyright:: (c) ;TI" registered trademark:: (r) ;T;0o; ;[I"produces:;T@o;;;;[o;;[I"em-dash;T;[o; ;[I"-- or ---;To;;[I" ellipsis;T;[o; ;[I"...;T@o;;[I"single quotes;T;[o; ;[I"'text' or `text';To;;[I"double quotes;T;[o; ;[I""text" or ``text'';T@o;;[I"copyright;T;[o; ;[I"(c);To;;[I"registered trademark;T;[o; ;[I"(r);T@S;;i; I"Documenting Source Code;T@o; ;[ I"PComment blocks can be written fairly naturally, either using <tt>#</tt> on ;TI"Esuccessive lines of the comment, or by including the comment in ;TI"Ia <tt>=begin</tt>/<tt>=end</tt> block. If you use the latter form, ;TI"Cthe <tt>=begin</tt> line _must_ be flagged with an +rdoc+ tag:;T@o;;[ I"=begin rdoc ;TI",Documentation to be processed by RDoc. ;TI" ;TI" ... ;TI" =end ;T;0o; ;[I"HRDoc stops processing comments if it finds a comment line starting ;TI"Gwith <tt>--</tt> right after the <tt>#</tt> character (otherwise, ;TI"Cit will be treated as a rule if it has three dashes or more). ;TI"CThis can be used to separate external from internal comments, ;TI"Lor to stop a comment being associated with a method, class, or module. ;TI"OCommenting can be turned back on with a line that starts with <tt>++</tt>.;T@o;;[I"## ;TI"8# Extract the age and calculate the date-of-birth. ;TI" #-- ;TI";# FIXME: fails if the birthday falls on February 29th ;TI" #++ ;TI"-# The DOB is returned as a Time object. ;TI" ;TI"def get_dob(person) ;TI" # ... ;TI" end ;T;0o; ;[ I"ONames of classes, files, and any method names containing an underscore or ;TI"Ppreceded by a hash character are automatically linked from comment text to ;TI"Otheir description. This linking works inside the current class or module, ;TI"Jand with ancestor methods (in included modules or in the superclass).;T@o; ;[I"HMethod parameter lists are extracted and displayed with the method ;TI"Rdescription. If a method calls +yield+, then the parameters passed to yield ;TI"will also be displayed:;T@o;;[I"def fred ;TI" ... ;TI" yield line, address ;T;0o; ;[I"!This will get documented as:;T@o;;[I"$fred() { |line, address| ... } ;T;0o; ;[I"QYou can override this using a comment containing ':yields: ...' immediately ;TI" after the method definition;T@o;;[ I")def fred # :yields: index, position ;TI" # ... ;TI" ;TI" yield line, address ;T;0o; ;[I"!which will get documented as;T@o;;[I"&fred() { |index, position| ... } ;T;0o; ;[I"J+:yields:+ is an example of a documentation directive. These appear ;TI"Limmediately after the start of the document element they are modifying.;T@o; ;[ I"ORDoc automatically cross-references words with underscores or camel-case. ;TI"KTo suppress cross-references, prefix the word with a \ character. To ;TI"Ginclude special characters like "<tt>\n</tt>", you'll need to use ;TI"Atwo \ characters in normal text, but only one in \<tt> text:;T@o;;[I""\\n" or "<tt>\n</tt>" ;T;0o; ;[I"produces:;T@o; ;[I""\\n" or "<tt>\n</tt>";T@S;;i; I"Directives;T@o; ;[I":Directives are keywords surrounded by ":" characters.;T@S;;i; I"#Controlling what is documented;T@o;;;;[ o;;[I"%+:nodoc:+ / <tt>:nodoc: all</tt>;T;[o; ;[I"@This directive prevents documentation for the element from ;TI"Bbeing generated. For classes and modules, methods, aliases, ;TI"Econstants, and attributes directly within the affected class or ;TI"Cmodule also will be omitted. By default, though, modules and ;TI"Hclasses within that class or module _will_ be documented. This is ;TI"-turned off by adding the +all+ modifier.;T@o;;[I"module MyModule # :nodoc: ;TI" class Input ;TI" end ;TI" end ;TI" ;TI"&module OtherModule # :nodoc: all ;TI" class Output ;TI" end ;TI" end ;T;0o; ;[I"OIn the above code, only class <tt>MyModule::Input</tt> will be documented.;T@o; ;[ I"LThe +:nodoc:+ directive, like +:enddoc:+, +:stopdoc:+ and +:startdoc:+ ;TI"Jpresented below, is local to the current file: if you do not want to ;TI"Pdocument a module that appears in several files, specify +:nodoc:+ on each ;TI"(appearance, at least once per file.;T@o;;[I"+:stopdoc:+ / +:startdoc:+;T;[o; ;[ I"PStop and start adding new documentation elements to the current container. ;TI"NFor example, if a class has a number of constants that you don't want to ;TI"Pdocument, put a +:stopdoc:+ before the first, and a +:startdoc:+ after the ;TI"Mlast. If you don't specify a +:startdoc:+ by the end of the container, ;TI"=disables documentation for the rest of the current file.;T@o;;[I"+:doc:+;T;[o; ;[I"JForces a method or attribute to be documented even if it wouldn't be ;TI"Potherwise. Useful if, for example, you want to include documentation of a ;TI"particular private method.;T@o;;[I"+:enddoc:+;T;[o; ;[I"PDocument nothing further at the current level: directives +:startdoc:+ and ;TI"R+:doc:+ that appear after this will not be honored for the current container ;TI"2(file, class or module), in the current file.;T@o;;[I",+:notnew:+ / +:not_new:+ / +:not-new:+ ;T;[o; ;[I"IOnly applicable to the +initialize+ instance method. Normally RDoc ;TI"Hassumes that the documentation and parameters for +initialize+ are ;TI"Lactually for the +new+ method, and so fakes out a +new+ for the class. ;TI"RThe +:notnew:+ directive stops this. Remember that +initialize+ is private, ;TI"Mso you won't see the documentation unless you use the +-a+ command line ;TI"option.;T@S;;i; I"Method arguments;T@o;;;;[o;;[I"%+:arg:+ or +:args:+ _parameters_;T;[o; ;[I"KOverrides the default argument handling with exactly these parameters.;T@o;;[ I"## ;TI"# :args: a, b ;TI" ;TI"def some_method(*a) ;TI" end ;T;0o;;[I")+:yield:+ or +:yields:+ _parameters_;T;[o; ;[I"AOverrides the default yield discovery with these parameters.;T@o;;[I"## ;TI"# :yields: key, value ;TI" ;TI"def each_thing &block ;TI" @things.each(&block) ;TI" end ;T;0o;;[I"+:call-seq:+;T;[ o; ;[I"JLines up to the next blank line or lines with a common prefix in the ;TI"Jcomment are treated as the method's calling sequence, overriding the ;TI">default parsing of method parameters and yield arguments.;T@o; ;[I" Multiple lines may be used.;T@o;;[I"# :call-seq: ;TI"-# ARGF.readlines(sep=$/) -> array ;TI"-# ARGF.readlines(limit) -> array ;TI"-# ARGF.readlines(sep, limit) -> array ;TI"# ;TI"(# ARGF.to_a(sep=$/) -> array ;TI"(# ARGF.to_a(limit) -> array ;TI"(# ARGF.to_a(sep, limit) -> array ;TI"# ;TI"1# The remaining lines are documentation ... ;T;0S;;i; I" Sections;T@o; ;[ I"RSections allow you to group methods in a class into sensible containers. If ;TI"Kyou use the sections 'Public', 'Internal' and 'Deprecated' (the three ;TI"Qallowed method statuses from TomDoc) the sections will be displayed in that ;TI"Qorder placing the most useful methods at the top. Otherwise, sections will ;TI"(be displayed in alphabetical order.;T@o;;;;[o;;[I"+:category:+ _section_;T;[o; ;[I"PAdds this item to the named +section+ overriding the current section. Use ;TI"Ithis to group methods by section in RDoc output while maintaining a ;TI"+sensible ordering (like alphabetical).;T@o;;[I""# :category: Utility Methods ;TI"# ;TI"# CGI escapes +text+ ;TI" ;TI"def convert_string text ;TI" CGI.escapeHTML text ;TI" end ;T;0o; ;[I"CAn empty category will place the item in the default category:;T@o;;[I"# :category: ;TI"# ;TI".# This method is in the default category ;TI" ;TI"def some_method ;TI" # ... ;TI" end ;T;0o; ;[I"MUnlike the :section: directive, :category: is not sticky. The category ;TI"@only applies to the item immediately following the comment.;T@o; ;[I"OUse the :section: directive to provide introductory text for a section of ;TI"documentation.;T@o;;[I"+:section:+ _title_;T;[o; ;[ I"MProvides section introductory text in RDoc output. The title following ;TI"N+:section:+ is used as the section name and the remainder of the comment ;TI"Ocontaining the section is used as introductory text. A section's comment ;TI"Pblock must be separated from following comment blocks. Use an empty title ;TI"&to switch to the default section.;T@o; ;[ I"HThe :section: directive is sticky, so subsequent methods, aliases, ;TI"Iattributes, and classes will be contained in this section until the ;TI"Osection is changed. The :category: directive will override the :section: ;TI"directive.;T@o; ;[ I"OA :section: comment block may have one or more lines before the :section: ;TI"Ndirective. These will be removed, and any identical lines at the end of ;TI"Lthe block are also removed. This allows you to add visual cues to the ;TI" section.;T@o; ;[I" Example:;T@o;;[I"0# ---------------------------------------- ;TI"# :section: My Section ;TI")# This is the section that I wrote. ;TI"+# See it glisten in the noon-day sun. ;TI"0# ---------------------------------------- ;TI" ;TI"## ;TI"# Comment for some_method ;TI" ;TI"def some_method ;TI" # ... ;TI" end ;T;0S;;i; I"Other directives;T@o;;;;[ o;;[I"+:markup:+ _type_;T;[o; ;[I"KOverrides the default markup type for this comment with the specified ;TI"Pmarkup type. For Ruby files, if the first comment contains this directive ;TI"=it is applied automatically to all comments in the file.;T@o; ;[ I"GUnless you are converting between markup formats you should use a ;TI"J<code>.rdoc_options</code> file to specify the default documentation ;TI"Jformat for your entire project. See RDoc::Options@Saved+Options for ;TI"instructions.;T@o; ;[I"NAt the top of a file the +:markup:+ directive applies to the entire file:;T@o;;[I"# coding: UTF-8 ;TI"# :markup: TomDoc ;TI" ;TI"# TomDoc comment here ... ;TI" ;TI"class MyClass ;TI" # ... ;T;0o; ;[I"For just one comment:;T@o;;[I" # ... ;TI" end ;TI" ;TI"# :markup: RDoc ;TI"# ;TI"3# This is a comment in RDoc markup format ... ;TI" ;TI"def some_method ;TI" # ... ;T;0o; ;[I"LSee Markup@CONTRIBUTING for instructions on adding a new markup format.;T@o;;[I"+:include:+ _filename_;T;[ o; ;[I"JInclude the contents of the named file at this point. This directive ;TI"Imust appear alone on one line, possibly preceded by spaces. In this ;TI"Fposition, it can be escaped with a \ in front of the first colon.;T@o; ;[ I"PThe file will be searched for in the directories listed by the +--include+ ;TI"Ooption, or in the current directory by default. The contents of the file ;TI"Mwill be shifted to have the same indentation as the ':' at the start of ;TI"the +:include:+ directive.;T@o;;[I"+:title:+ _text_;T;[o; ;[I"JSets the title for the document. Equivalent to the <tt>--title</tt> ;TI"Pcommand line parameter. (The command line parameter overrides any :title: ;TI"directive in the source).;T@o;;[I"+:main:+ _name_;T;[o; ;[I">Equivalent to the <tt>--main</tt> command line parameter.;T: @fileI"lib/rdoc/markup.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I"attribute_manager;TI"R;T:publicFI"lib/rdoc/markup.rb;T[ [ [[I" class;T[[;[[I"new;T@T[I" parse;T@T[:protected[ [:private[ [I" instance;T[[;[ [I" add_html;T@T[I"add_regexp_handling;T@T[I"add_word_pair;T@T[I"convert;T@T[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@OI"lib/rdoc/parser.rb;TI"!lib/rdoc/parser/changelog.rb;TI"lib/rdoc/parser/simple.rb;TI"lib/rdoc/rd.rb;TI"lib/rdoc/stats.rb;TI"lib/rdoc/tom_doc.rb;T@OcRDoc::TopLevel