What I’m trying to accomplish is having B reference A but in the same
module
its currently in. I can accomplish this by redefining the initialize
method
again in Mod2::B, such that it looks exactly the same as Mod1::B, but
I’m
hoping to find a trick to avoid having to do that.
Here’s a small snippet of code I’m trying to hack on:
What I’m trying to accomplish is having B reference A but in the same
module
its currently in. I can accomplish this by redefining the initialize
method
again in Mod2::B, such that it looks exactly the same as Mod1::B, but
I’m
hoping to find a trick to avoid having to do that.
Any thoughts?
You could use #const_get, possibly, since a method call is dynamic.