D
David Garamond
Is the more common convention:
module Foo
module Bar
class Baz
...
end
end
end
or this:
module Foo; end
module Foo::Bar; end
class Foo::Bar::Baz
...
end
I prefer the second because I dislike having to indent several times.
Also, is there a possibility that Ruby will "autovivify":
module Foo::Bar::Baz
class Foo::Bar::Baz2
so it creates modules Foo, Bar, Baz automatically?
module Foo
module Bar
class Baz
...
end
end
end
or this:
module Foo; end
module Foo::Bar; end
class Foo::Bar::Baz
...
end
I prefer the second because I dislike having to indent several times.
Also, is there a possibility that Ruby will "autovivify":
module Foo::Bar::Baz
class Foo::Bar::Baz2
so it creates modules Foo, Bar, Baz automatically?