Suppose I have a module:
module M
def self.foo
...
end
def bar
...
end
end
Module M
is included in a class.
class A
include M
end
I want to call foo
from bar
, which will eventually be called on an instance of A
. What's the best way to do this inside bar
?
Of course I can just say M.foo
, but that's duplication of the module's name, which feels unnecessary.