Previously, we saw how to make each individual instance of a class hold on to the information about itself. A book object, an instance of the Book class, knew its own title and author and genre.
Use class variables to keep track of data pertaining to a class. Define class methods to expose data pertaining to a class. We also need our Song class to be able to keep track of the number of songs ...
I will explain in detail about each variable Ruby global variable are used globally in whole application. Ruby global variable are denoted by $ sign $global_variable ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results