在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ruby/rdoc开源软件地址:https://github.com/ruby/rdoc开源编程语言:Ruby 96.8%开源软件介绍:¶ ↑RDoc - Ruby Documentation System
¶ ↑DescriptionRDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the ¶ ↑Generating DocumentationOnce installed, you can create documentation using the $ rdoc [options] [names...] For an up-to-date option summary, type $ rdoc --help A typical use might be to generate documentation for a package of Ruby source (such as RDoc itself). $ rdoc This command generates documentation for all the Ruby and C source files in and below the current directory. These will be stored in a documentation tree starting in the subdirectory You can make this slightly more useful for your readers by having the index page contain the documentation for the primary file. In our case, we could type % rdoc --main README.rdoc You'll find information on the various formatting tricks you can use in comment blocks in the documentation this generates. RDoc uses file extensions to determine how to process each file. File names ending To generate documentation using To generate documentation programmatically: gem 'rdoc' require 'rdoc/rdoc' options = RDoc::Options.new # see RDoc::Options rdoc = RDoc::RDoc.new rdoc.document options # see RDoc::RDoc ¶ ↑Writing DocumentationTo write documentation for RDoc place a comment above the class, module, method, constant, or attribute you want documented: ## # This class represents an arbitrary shape by a series of points. class Shape ## # Creates a new shape described by a +polyline+. # # If the +polyline+ does not end at the same point it started at the # first pointed is copied and placed at the end of the line. # # An ArgumentError is raised if the line crosses itself, but shapes may # be concave. def initialize polyline # ... end end The default comment markup format is the RDoc::Markup format. TomDoc, Markdown and RD format comments are also supported. You can set the default comment format for your entire project by creating a Comments can contain directives that tell RDoc information that it cannot otherwise discover through parsing. See RDoc::Markup@Directives to control what is or is not documented, to define method arguments or to break up methods in a class by topic. See RDoc::Parser::Ruby for directives used to teach RDoc about metaprogrammed methods. See RDoc::Parser::C for documenting C extensions with RDoc. To determine how well your project is documented run ¶ ↑BugsSee CONTRIBUTING@Bugs for information on filing a bug report. It's OK to file a bug report for anything you're having a problem with. If you can't figure out how to make RDoc produce the output you like that is probably a documentation bug. ¶ ↑LicenseRDoc is Copyright © 2001-2003 Dave Thomas, The Pragmatic Programmers. Portions © 2007-2011 Eric Hodel. Portions copyright others, see individual files and LEGAL.rdoc for details. RDoc is free software, and may be redistributed under the terms specified in LICENSE.rdoc. ¶ ↑WarrantyThis software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论