Tag Archives: accessor

Classes in Ruby

Ruby is an object-oriented programming language. This example demonstrates a superclass for representing a car. Two subclasses are used for representing a hero car and a villain car, they inherit from the superclass.

Posted in Ruby | Also tagged , , , , , , | Leave a comment