This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Ruby and the fly likes Ruby Doc for code and other stuff Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Ruby Doc for code and other stuff" Watch "Ruby Doc for code and other stuff" New topic

Ruby Doc for code and other stuff

Trilochan Bharadwaj
Ranch Hand

Joined: Feb 02, 2009
Posts: 100

I just got started with Ruby (I am from Java world, and have played around with Haskell and Scala a bit); I am just wondering: What are the things that are wrong in this code, if someone can point it out, like from best practices and convention perspective and also How do I Ruby-Doc this, javadoc was pretty straight forward (especially with Eclipse), (I am using Eclipse Ruby IDE right now), here's my code:

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
From the command line you can do "rdoc [path to .rb file]" to generate the RDoc for a single file.
Most people tend to use build scripts (usually Rake) for doing this stuff for the whole project, though.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Ruby Doc for code and other stuff
It's not a secret anymore!