Hi everyone,

I have a problem with a supposedly elementary thing.

In trying to be Pragmatic(tm), I want my program to read
all its configuration parameters from a text file. Though
I've been trying to make the text file's format as simple
as possible, I couldn't (?) avoid ending up in the
following situation:

The "main loop" in the method that reads the file, reads
a parameter on each line (for simplicity) according to a
keyword-value scheme, and constructs the appropriate
objects. However, some of the data I want to read are
strings containing line breaks. I solved it by doing
something along the lines of here documents, i e
something like

parameter value
parameter value
long-parameter WHATEVER
  data
  data
WHATEVER
parameter value
...

So I'd like the main loop to read normal parameters, and
when it encounters a long parameter-type, let another
method copy a few lines "verbatim", and when it's done,
assign the data to the appropriate instance variable and
let the main loop pick up after the end marker as if
nothing happened...

Is there a neat, "Ruby-way" of pulling this off? Or do I
just have to reconsider my choice of file format?

/Niklas