T
toulax
I'm a newcomer to ruby and there's this little something I don't
really understand:
class One::Two
....
end
Class One::Three
....
end
On this example, what does "::" mean? If understand correctly it's
just sort of a naming convention to imply that both the Two and Three
classes belong to the same "group", as in Net::HTTP and Net::FTP.
So, in essence Two and Three are completely unrelated, and I'd not
even need to have a class named One for it to work, is that right?
If not, please tell me, what exactly is the purpose of "::" on class
names?
Thanks
really understand:
class One::Two
....
end
Class One::Three
....
end
On this example, what does "::" mean? If understand correctly it's
just sort of a naming convention to imply that both the Two and Three
classes belong to the same "group", as in Net::HTTP and Net::FTP.
So, in essence Two and Three are completely unrelated, and I'd not
even need to have a class named One for it to work, is that right?
If not, please tell me, what exactly is the purpose of "::" on class
names?
Thanks