On Fri, Jan 4, 2013 at 6:08 AM, Josh Cheek <[email protected]> wrote:
> O.o You have 3000 classes? I can't imagine such a project. That's not overly large for a reasonable sized project I'd say. > Anyway, there are ways you could do this, but they would require the > blackest of magics (hooking into require or using set_trace_func, and then > parsing the files in some manner to identify the namespaces around the > classes so you can locate them to include the module). Really, what Robert > suggested makes the most sense, include it into Object. Or, even better, make it a "function", i.e. define it at top level and pass the object as argument. > But honestly, with a project that big, I think I'd want everything to be > absolutely explicit all the time, anyway. +1 > 3000 is a huge number, though. Are you generating code? Why do all of your > classes need to include a colourization module? I very rarely need any such > thing, perhaps there is a deeper issue here which would be more useful to > discuss than this idea (which is a highly questionable one anyway). Yes, that might well be. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
