On Mon, 16 Sep 2002 dblack / candle.superlink.net wrote:

> Yes, a full-featured decameler would have to get over that hump (ha
> ha).  Mine is very mini and quick-n-dirty, probably to the point of
> pointlessness.  I imagine there's literally no way to do it perfectly,
> without harnessing an actual Ruby parser.

Just an idea: you have an actual Ruby parser conveniently available, one
that can even decamel C-extensions -- that Ruby parser that we know and
love:

module DeCamel
  alias method_missing camel_method_missing
  def method_missing (*args)
    m = args.first.camel
    if methods.include? m
      send (m, *args[1..-1])
    else
      camel_method_missing (*args)
    end
  end
end

class CamelClass
  include DeCamel
end

Ok, untested an propably doesn't work as it is...

  -- Nikodemus