Object Oriented Programming
To understand variable scope, one must understand object orientation. Ruby is an object oriented language, that means that everything is based upon objects that have attributes and can be used for various tasks through methods. You can think of an object as a human and a method as a verb such as run. Just as how you tell a human to run, you can also tell an object to do something via methods.
These Ruby objects are not the same. They can be Integer objects, String objects, Array objects etc. We call these individual objects instancesof a particular class.