The Old Switcharoo

T

Trans

I have a class that has a lot of data members. On top of that I have a
lot methods that I dynamically mixin to that class as needed, and they
of course use those data members. The thing is the methods and data
members are numerous enough and related in such a way that there is
some contention for namespace. Since I'm only calling on the methods as
needed it would be cool if I could acually mix one in, invoke it, and
then snatch it back out just before executation begins to let the data
member back in. In other words, I guess I want caller context sensitive
(cflow?) namespacing.

Interesting? Possible? Any clever ways to pull it off in pure Ruby?

Thanks,
T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top