From: Zhi-Qiang Lei Date: 2010-11-07T17:37:05+09:00 Subject: Re: Meaning of :: What about code like: ::Digest::MD5.hexdigest "xxx" Why is the :: before Digest module nothing? On Nov 7, 2010, at 1:29 PM, Scott Gonyea wrote: > Class and Module names must be in their "proper case" form. So, "Class1::Base". Constants are in all caps, while methods and variable names are lower case. > > The :: operator is used to delimit namespace. Without using namespaces for your library, everyone who wanted to call their class "Base" would collide with each other. You'd get some very unpredictable behavior. > > Besides preventing namespace collisions, it helps you to organize and describe your objects. > > Scott > > On Nov 6, 2010, at 8:11 PM, Guido Granobles wrote: > >> Hi!.. I'm very new with Ruby and I wold like to know what does it mean >> the four points when I am doing inheritance. Like: >> [code] >> class1::base >> [/code] >> I know that it represents a constant but how I should interpret that. >> >> -- >> Posted via http://www.ruby-forum.com/. >> > > Best regards, Zhi-Qiang Lei zhiqiang.lei@gmail.com