The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Rdoc::Usage

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Britt

Posts: 1319
Nickname: jamesbritt
Registered: Apr, 2003

James Britt is a principal in 30 Second Rule, and runs ruby-doc.org and rubyxml.com
Rdoc::Usage Posted: Aug 13, 2004 1:06 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by James Britt.
Original Post: Rdoc::Usage
Feed Title: ruby-doc
Feed URL: http://www.ruby-doc.org/index.rb/rss0.91.xml
Feed Description: New and updates for the Ruby Documentation Project web site.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by James Britt
Latest Posts From ruby-doc

Advertisement

Dave Thomas has coded an addition to Rdoc that makes it easy for code to emit sections of rdoc text. From his post on ruby-talk:

Basically, if the main program file in your application has an RDoc comment describing the program, you can use it to generate a usage message for your users by calling

RDoc::usage( )

If you just want to display the Synopsis section (which in the RDoc will have a heading "= Synopsis"), you'd instead say

RDoc::usage('synopsis')

To display the author and copyright sections, you'd say

RDoc::usage('author', 'copyright')

You can learn more here.

RDoc::usage is in the head of Ruby 1.9 and 1.8 CVS right now.

Read: Rdoc::Usage

Topic: The Tiger's Vest (with a Basic Introduction to Irb) Previous Topic   Next Topic Topic: Rails rides the virgin voyage at Mach 3

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use