I have
/a.rb
require_relative ‘a/b’
module A
def self.foo
"HA"
end
end
/a/b.rb
module A
class B
VAR = A.foo * 3
end
end
Unfortunately it errors out as Undefined foo method inside A module and I don't know why.
A is used mostly as a namespace, and I've decided to put some methods in there as configuration - they actually set the root of the project and the root + /config directory for configuration purposes.
How can I accomplish this?