Everything You Need to Know About Variables
Variables are named references to objects in memory. Their several variants (local, instance, class, constant, etc) each have their own subtleties.
Local Variables and Bindings
Ruby has a no-surprise take on local variables, they're handled similarly in most programming languages. However, Ruby implements them differently than stack-based languages.
Instance variables are some of the most common and important variables types in Ruby. They begin with the at sign (@) and allow objects to track their internal state.
Class variables in Ruby are more or less as you'd expect form an object oriented language. However, Ruby throws you a curveball you can use to your advantage.
Ruby's idea of constant variables is mostly without surprise, however their implementation is not exactly "constant."
Global variables are not often used in Ruby, however, you should at least understand their usage should you ever encounter them.
What are Variables?
An explanation of what variables are and how they affect your Ruby program.
Using Variables in Ruby
Learn how to use variables in Ruby, assign them information using the assignment operator and pass to a variable using the "puts" function.
Ruby Annoyances: Variables Don't Have Type
To many programmers new to Ruby and dynamic languages in general, one annoyance or point of confusion is that variables don't have type.
Using environment variables in Ruby.
Constants in Ruby
Like just about every programming language every conceived, Ruby supports constants. A constant is a variable whose value cannot be changed. However, in Ruby, this has some caveats.