• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Ruby Naming Rules (@,@@,$)

Status
Not open for further replies.
*
Code:
@instance_variable
@@class_variable
CONSTANT_VARIABLE
Class/ModuleName
local_variable

Classes and Modules, despite being constants, are named differently so as to make them easily differentiable.

You also forgot the rules on word separators, Hakeem. And yeah, they're not particularly hard to remember and adhere to.
 
In ruby, these are not just conventions. Your interpreter will complain if you try to do

A = 1
A = 2

^^

And while these are not that many, I still have to look them up every now and then.

Edit: Btw, if they are so easy to remember, why did our dear fellow Hakeem then forget about 40% of the rules when posting them ; )
 
Status
Not open for further replies.
Back
Top