It’s good to follow Ruby convetions while writing Ruby programs. In this short tutorial I will a cover a few rules about naming variables, methods, classes and modules in Ruby.
Golabal variables in Ruby start with a dollar sign: $
Class variables are prefixed with two “at” signs: @@
Instance variable starts with an “at” sign: @
Local variables are in lowercase letters.
Constants start with an uppercase letter.
Class names begin with an uppercase letter.
Module names start with an uppercase letter like class names.
In Ruby, method names and parameters should start with smallcase letter. If method name or parameters has includes than one words, you should separate them using underscores.