set class variable ruby code example Example: ruby class variable class Customer @@no_of_customers = 0 end