Tuesday, 13 August 2013

Nested modules and instance level methods

Nested modules and instance level methods

I suppose I have
module A
include module B
class C
def methodC
B.methodB
end
def self.methodD
somemethod
end
end
and
module B
def self.methodB
A::C.methodD
end
end
instance = A::C.new
How can I avoid using the use of this class level methods (self) ? In
fact, how could I call methodB on instance ?

No comments:

Post a Comment