{
    "mode": "ri",
    "parameter": "RDoc::Generator",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/ri/RDoc%3A%3AGenerator/json",
    "generated": "2026-06-02T15:59:10Z",
    "sections": {
        "RDoc::Generator": {
            "content": "(from gem rdoc-7.2.0)\n------------------------------------------------------------------------\nRDoc uses generators to turn parsed source code in the form of an\nRDoc::CodeObject tree into some form of output.  RDoc comes with the\nHTML generator RDoc::Generator::Darkfish and an ri data generator\nRDoc::Generator::RI.\n",
            "subsections": [
                {
                    "name": "Registering a Generator",
                    "content": "Generators are registered by calling RDoc::RDoc.addgenerator with the\nclass of the generator:\n\nclass My::Awesome::Generator\nRDoc::RDoc.addgenerator self\nend\n"
                },
                {
                    "name": "Adding Options to rdoc",
                    "content": "Before option processing in rdoc, RDoc::Options will call\n::setupoptions on the generator class with an RDoc::Options instance.\nThe generator can use RDoc::Options#optionparser to add command-line\noptions to the rdoc tool.  See RDoc::Options@Custom+Options for an\nexample and see OptionParser for details on how to add options.\n\nYou can extend the RDoc::Options instance with additional accessors for\nyour generator.\n"
                },
                {
                    "name": "Generator Instantiation",
                    "content": "After parsing, RDoc::RDoc will instantiate a generator by calling\n#initialize with an RDoc::Store instance and an RDoc::Options instance.\n\nThe RDoc::Store instance holds documentation for parsed source code.  In\nRDoc 3 and earlier the RDoc::TopLevel class held this data.  When\nupgrading a generator from RDoc 3 and earlier you should only need to\nreplace RDoc::TopLevel with the store instance.\n\nRDoc will then call #generate on the generator instance.  You can use\nthe various methods on RDoc::Store and in the RDoc::CodeObject tree to\ncreate your desired output format.\n------------------------------------------------------------------------"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}