Jamis Buck wrote:
> Randy W. Sims wrote:
> 
>> Are there any Ruby modules that allow documentation to act as source 
>> code?
>
> I haven't seen it done in Ruby, but the general idea is called "literate 
> programming". If you google for that term, you'll find lots of information.

If you want to try out literate programming, I recommend the "Leo" 
editor. It's an hierarchical text editor with features for literate 
programming. Leo is written in our "sister language" Python, but it 
isn't really tied in to any particular programming language. You can use 
  Leo to write Ruby, C, Pascal, PHP, LaTeX, HTML or whatever you want. 
The web site is:

   http://webpages.charter.net/edreamleo/front.html

I've toyed a bit with literate programming, but I'm not really sold on 
the idea. I guess my problem with "documentation as source" (or even 
with "source as documentation", but that is a smaller gripe) is the 
notion that a program only has one "story". Usually, I find that in my 
programs there are many different stories: a story for a beginner user, 
a story for an expert user, a story for someone who wants to extend the 
module, a story for someone who wants to hack it, a story for someone 
who wants to understand and study the technology behind it. And of 
course, there can be stories can be in different languages. Trying to 
put all these stories as well as the source code in the same document 
tends to be confusing, at least for me.

But even if you don't use literate programming, Leo by itself is a great 
tool for organizing source code and text. You should check it out.

// Niklas