Ruby defines some naming conventions for its variable, method, constant and class.
- Constant: Starts with a capital letter.
- Global variable: Starts with a dollar sign ($).
- Instance variable: Starts with a (@) sign.
- Class variable: Starts with a (@@) sign.
- Method name: Allowed to start with a capital letter.
Leave a Reply