makeRst

Class.makeRst(fs, dir_path)

ソース

    makeRst(fs, dir_path) {
        var rst = "";

        rst += this.className + "\n";
        rst += "=".repeat(this.className.length) + "\n\n";

        if (this.comment != null) {

            rst += "説明\n^^^^^^\n\n";
            rst += this.comment + "\n\n";
        }


        rst += `

.. toctree::
    :maxdepth: 1
    :caption: メソッド:

`;

        for(let fnc of this.methods) {
            fnc.makeRst(fs, dir_path);

            rst += "    " + fnc.fncName + "\n";
        }


        fs.writeFile(dir_path + 'index.rst', rst);
    }