I
> At any point (inside or outside a class definition), you could do:
> 
>   meth = "talk"   # using string interpolation just to illustrate output
>   = "hi"
>   Object.module_eval <<-EOE
>     def #{meth}
>       puts "#{output}"
>     end
>   EOE

Just out of interest, what's the difference between using "eval %{ ...}"
and a "here" document as you've suggested?

> You can always switch to the context of a particular class, even if you
> just have its name in a string:

I knew that from a correspondence I had with Dave Thomas on the ML the
other day, when I was trying to do something fiddly.  His explanation
was, as usual, very enlightening.

Here's a question, though.  If I have a global function (or any function,
for that matter) and call it from within the context of a class, can I
findout the class of the caller?  Eg,

  def fred(text)
	# How can I find out who called me here?
  end

  class Jim
	fred("Hello")
  end

> This is Ruby.  The odds are greatly in your favor :-)

I already have the basic thing working. I now want to make it more
useful.  I'll keep mum about what I'm working on until I have something
that's actually useful, though.