Variable declaration in Ruby

We can describe the variable in 4 different types : Local variable Class variable Instance variable Global variable Let’s check, How variable works in their comfort zones. Local Variable: Always start with lowercase or underscore ( _ ). It works only in the variable declared block. For example, Class Variable: Always start with @@ and […]