From: Hugh Sasse Staff Elec Eng Date: 2000-08-08T11:53:31+01:00 Subject: [ruby-talk:04341] DRY and embedded docs. If I have a here document in some ruby program: print <<"END" usage #{$0} options arguments where option is -a (or whatever) .... -z ( i.e a whole load of these) END How can I get this text into a =begin =end section so I can have it as documentation, without breaking the Don't Repeat Yourself rule? I cannot do print <<"END" =begin usage #{$0}..... =end END because the =begin and =end are no longer considered documentation by ruby. They may be by some other program, admittedly, but they end up in the string created by the here document, which I don't want. Clearly one may need to put lines beginning with = in a here document, so ruby _is_ doing the right thing, but I cannot have the lines considered to be both a here document and embedded documentation. Is there a cunning way round this without generating my ruby from m4 or some such? Hugh hgs@dmu.ac.uk