Ruby Notes - Naming Conventions
-
local variables, method parameters, and method names start with a lowercase letter or underscore.
-
Global variables start with a
$
. eg:-$plan
,$customer
-
Instance variables start with @.
@name
,@pw
-
Class variables start with @@ and must be initialized before using it:
@@plays
,@@count
-
Class name or constants start with an uppercase letter:
Person
,PI