{
    "content": [
        {
            "type": "text",
            "text": "# RDoc::Parser::Ruby (ri)\n\n## Section Outline\n\n- **RDoc::Parser::Ruby < RDoc::Parser** (1 lines)\n- **Includes:** (27 lines) — 3 subsections\n  - Method Arguments (26 lines)\n  - Metaprogrammed Methods (39 lines)\n  - Hidden methods and attributes (19 lines)\n- **Constants:** (7 lines)\n- **Class methods:** (2 lines)\n- **Instance methods:** (50 lines)\n\n## Full Content\n\n### RDoc::Parser::Ruby < RDoc::Parser\n\n------------------------------------------------------------------------\n\n### Includes:\n\n(from gem rdoc-7.2.0)\nRDoc::TokenStream\nRDoc::Parser::RubyTools\n\n(from gem rdoc-7.2.0)\n------------------------------------------------------------------------\nExtracts code elements from a source file returning a TopLevel object\ncontaining the constituent file elements.\n\nThis file is based on rtags\n\nRubyParser understands how to document:\n* classes\n* modules\n* methods\n* constants\n* aliases\n* private, public, protected\n* privateclassfunction, publicclassfunction\n* privateconstant, publicconstant\n* modulefunction\n* attr, attrreader, attrwriter, attraccessor\n* extra accessors given on the command line\n* metaprogrammed methods\n* require\n* include\n\n#### Method Arguments\n\nThe parser extracts the arguments from the method definition.  You can\noverride this with a custom argument definition using the :call-seq:\ndirective:\n\n##\n# This method can be called with a range or an offset and length\n#\n# :call-seq:\n#   mymethod(Range)\n#   mymethod(offset, length)\n\ndef mymethod(*args)\nend\n\nThe parser extracts yield expressions from method bodies to gather the\nyielded argument names.  If your method manually calls a block instead\nof yielding or you want to override the discovered argument names use\nthe :yields: directive:\n\n##\n# My method is awesome\n\ndef mymethod(&block) # :yields: happy, times\nblock.call 1, 2\nend\n\n#### Metaprogrammed Methods\n\nTo pick up a metaprogrammed method, the parser looks for a comment\nstarting with '##' before an identifier:\n\n##\n# This is a meta-programmed method!\n\naddmymethod :metamethod, :arg1, :arg2\n\nThe parser looks at the token after the identifier to determine the\nname, in this example, :metamethod.  If a name cannot be found, a\nwarning is printed and 'unknown' is used.\n\nYou can force the name of a method using the :method: directive:\n\n##\n# :method: somemethod!\n\nBy default, meta-methods are instance methods.  To indicate that a\nmethod is a singleton method instead use the :singleton-method:\ndirective:\n\n##\n# :singleton-method:\n\nYou can also use the :singleton-method: directive with a name:\n\n##\n# :singleton-method: somemethod!\n\nYou can define arguments for metaprogrammed methods via either the\n:call-seq:, :arg: or :args: directives.\n\nAdditionally you can mark a method as an attribute by using :attr:,\n:attrreader:, :attrwriter: or :attraccessor:.  Just like for\n:method:, the name is optional.\n\n##\n# :attrreader: myattrname\n\n#### Hidden methods and attributes\n\nYou can provide documentation for methods that don't appear using the\n:method:, :singleton-method: and :attr: directives:\n\n##\n# :attrwriter: ghostwriter\n# There is an attribute here, but you can't see it!\n\n##\n# :method: ghostmethod\n# There is a method here, but you can't see it!\n\n##\n# this is a comment for a regular method\n\ndef regularmethod() end\n\nNote that by default, the :method: directive will be ignored if there is\na standard rdocable item following it.\n------------------------------------------------------------------------\n\n### Constants:\n\nNORMAL:\nRDoc::NormalClass type\n\nSINGLE:\nRDoc::SingleClass type\n\n### Class methods:\n\nnew\n\n### Instance methods:\n\ncollectfirstcomment\nerror\ngetbool\ngetclassormodule\ngetclassspecification\ngetconstant\ngetincludedmodulewithoptionalparens\ngetsymbolorname\nlookfordirectivesin\nmakemessage\nnewcomment\nparsealias\nparseattr\nparseattraccessor\nparsecallparameters\nparseclass\nparseclassregular\nparsecomment\nparsecommentghost\nparsecommenttomdoc\nparseconstant\nparseconstantvisibility\nparsemetaattr\nparsemetamethod\nparsemethod\nparsemethoddummy\nparsemethodoryieldparameters\nparsemethodparameters\nparsemethodparamsandbody\nparsemodule\nparserequire\nparserescue\nparsestatements\nparsesymbolarg\nparsesymbolinarg\nparsetoplevelstatements\nparsevisibility\nparseyield\nreaddirective\nreaddocumentationmodifiers\nretrievecommentbody\nscan\nskipforvariable\nskipmethod\nskipoptionaldoafterexpression\nskipparentheses\nskiptkspacecomment\ntknl?\nwarn\n\n"
        }
    ],
    "structuredContent": {
        "command": "RDoc::Parser::Ruby",
        "section": "",
        "mode": "ri",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "RDoc::Parser::Ruby < RDoc::Parser",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "Includes:",
                "lines": 27,
                "subsections": [
                    {
                        "name": "Method Arguments",
                        "lines": 26
                    },
                    {
                        "name": "Metaprogrammed Methods",
                        "lines": 39
                    },
                    {
                        "name": "Hidden methods and attributes",
                        "lines": 19
                    }
                ]
            },
            {
                "name": "Constants:",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "Class methods:",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "Instance methods:",
                "lines": 50,
                "subsections": []
            }
        ]
    }
}