Erik Veenstra
10/11/2008 8:18:00 AM
module AutoRequire
def const_missing(const)
puts File.join(to_s.split(/::/), const.to_s) + ".rb"
end
end
# In A.rb:
module A
extend AutoRequire
end
A::B
# In A/B.rb:
module A
module B
extend AutoRequire
end
end
A::B::C
gegroet,
Erik V.