Suppose you have written a word processor. Or at least
something that converts plain-text-with-markup to HTML, or TXT,
or PDF.

Since all to_html methods of all classes (Document, Header,
Section, TOC, Image, etc) work together closely to generate
HTML, you can define them in one file, instead of scattering
this functionality over dozens of files.

The main script (abc.rb) requires a couple of files:

 require "abc_base"
 require "abc_to_txt"
 require "abc_to_html"
 require "abc_to_pdf"

For me, it's often pointless to group all methods of one class
in one big file, like you have to do in Java. How do
Header#to_html and Header#to_pdf work together? Do they work
together? If not, why should I define them in the same place?

gegroet,
Erik V. - http://www.erikveen.dds.nl/