34,333
edits
Changes
→Ruby Local Variables
== Ruby Local Variables ==
Local variables are local to the code construct in which they are declared. For example, a local variable declared in a method or within a loop cannot be accessed outside of that loop or method. Local variables name variable names must begin with either an underscore or a lower case letter. For example:
<pre>