Typically, in Ruby, we see modules and classes nested by having one declaration inside of the the other.
1 2 3 4 |
module Foo class Bar end end |
When the outer class or module has previously been declared, however, we can also declare the nested one directly using its fully qualified name, and it is not uncommon to see that done.
1 2 3 4 |
module Foo class Foo::Bar end |
On the… Read more »
Recent Comments