Hi,
given this code:
class Foo
def bar
return Bar.new
end
end
class Bar
...
end
I get this error:
NameError: uninitialized constant Bar
This obviously works if I put Bar before Foo but that is not a real solution though.
Any ideas on how to solve this without considering the order?
Many thanks.
UPDATE:
Of course the error occurs only when calling Foo.new.bar
and not when defining.