ara.t.howard / noaa.gov wrote:

> yikes.  i've done exactly this kind of this many times but i'm tending away
> from it.  the reason is that the spec just doesn't quite fit when s is defined
> thusly:
>
>    s = <<-yml
>
>      "hard to use" : "forty-two"
>
>      42 : "impossible to use"
>
>      "!can't work" : "etc"
>
>    yml
>
> i suppose it's ok to contrain configs you have keys that are valid ruby
> methods, still i've just found myself in a corner with that a few times and
> have strayed away from it every since.  like i said, i still have lots of code
> doing stuff with method_missing, but i thought i'd put my thought out there
> for posterity and for people starting new designs.

Yes, I do constrain the config keys to single word case insensitive
strings. Unfortuate I just don't see a nicer way. "y[:a][:b][:c]" just
lacks all elegance. And path notation (y/:a/:b/:c) while a _little_
better can't use setting at the end (eg. y/:a/:b/:c = x). So what else
is there?

> > You're right about that. There are limitations to using method_missing.
> > Though I don't mind so much if the limitations are *well defined* and
> > minimial, but the current state of affairs is too iffy.
>
> what do you mean 'iffy' exactly?

Well, for instance. If a public method is added to Kernel or Object (or
any subclass for that matter) it will show up in ones class and block
out method_missing.

> that the list of 'require' methods seems to change every few months?

Not sure what you mean.

T.