I
Ittay Dror
Hi,
I have a situation like this:
module M
....
end
class C1
include M
...
end
class C2
include M
...
end
Now I want to add methods to C1 and C2 and whatever other class includes M.
My first approach was:
module S
....
end
module M
include S
end
But this doesn't work (meaning whatever methods I have in S are
undefined for instances of C1, C2).
So, how can I do that?
Thanks,
Ittay
I have a situation like this:
module M
....
end
class C1
include M
...
end
class C2
include M
...
end
Now I want to add methods to C1 and C2 and whatever other class includes M.
My first approach was:
module S
....
end
module M
include S
end
But this doesn't work (meaning whatever methods I have in S are
undefined for instances of C1, C2).
So, how can I do that?
Thanks,
Ittay