From: Rein Henrichs Date: 2010-06-15T08:21:37+09:00 Subject: Re: Metaprograming On 2010-06-14 10:36:57 -0700, Jes��s Gabriel y Gal��n said: > Of course, it might very well be the case that to solve OP's problem, > this is not necessary at all and that studying his original problem > might lead to a different solution, but in any case I see no harm in > explaining him method_missing and how to define methods. Feel free to > ask him about what problem he is trying to solve, and maybe we can > come up with a better solution. > > Regards, > > Jesus. Agreed. I would prefer that we attempt to understand a bit more of the context of the question. Rant follows: Questions like these are often the result of something like the Dunning���Kruger effect, where the questioner may not know enough to know that the question is bad and may only receive a confusing or misleading answer. For example: A: "How can I get more angular velocity out of this screwdriver?" B: "Um, just twist it harder." A: "Ok, that isn't helping me drive this nail in." B: *facepalm* "Oh, you should be using a hammer." TL;DR: Why does OP want to define methods dynamically? What business value would this provide? -- Rein Henrichs http://puppetlabs.com http://reinh.com