I want to invoke method a from method of module B. How can I do it? I don’t want to specify A::a every time.
module A
def self.a
"a"
end
end
module B
extend A
def self.b
a
end
end
p B::b # => undefined local variable or method `a' for B:Module
I found here a method to solve it but it doesn’t look good to me: