instersting. with something like this, if the method_missing routine was
sophisticated enough you could have "sloppy" programming. imagine your
program still working even if you misspelled a method call. a strange
notion.

~transami

On Fri, 2002-07-12 at 12:58, John wrote:
> Hi all,
> 
> I wonder if anyone has any suggestions on how to create a method that
> matches its name based on a regular expression.  For instance:
> 
> class Foo
>   def /bar*/
>     puts "Wow!"
>   end
> end
> 
> Then I could do something like:
> 
> foo = Foo.new
> foo.barchart
> foo.barstweward
> 
> The regexp method name throws the interpreter off of course.
> 
> I looked at the method_missing feature to implement this.  It gets part of
> the problem solved, but I then don't know what the regular expression for
> the method name is.
> 
> Anyone have any ideas or pointers on where I could look?
> 
> TIA, John.
> 
> 
> 
-- 
~transami

  __("<  berk! berk!
  \__/  
   ^^