From: ara.t.howard@... Date: 2006-12-10T14:09:53+09:00 Subject: Re: bending ruby space On Sun, 10 Dec 2006, Trans wrote: > i came upon this "pattern" working on a rather difficult problem. see > if you can wrap your head around this bending of ruby space and what it > might be good for. > > module R; end > module U; include R; end > module R; extend U; end one side effect is that all instance methods of R are available at the module level too. i generally do that this way: harp:~ > cat a.rb class Module def export meth module_function meth public meth end end module R def foo() 42 end export :foo end p R.foo harp:~ > ruby a.rb 42 what that what you were after, but wholesale? interesting trick. regards. -a -- if you want others to be happy, practice compassion. if you want to be happy, practice compassion. -- the dalai lama