When you write class Something , you provide Something a constant name, so providing the name with the :: operator is equivalent to opening an external class and creating this inner class. The :: operator is just a way to access a constant inside a class or module from outside this class or module. for example, something like this is quite fair:
class Outer class Inner end class Inner::EvenMoreInner end end class Outer::Inner::EvenMoreInner::InnerMost end
Note: you cannot just write class Some::New::Class::Hierarchy and create all contained classes automatically. i.e., Some::New::Class must exist first. This is why I requested the exact order of the code that you wrote in my comment on the question.
mikej source share