Classes and Modules

  • Matt Clements


In the previous chapters we have discussed the basics of the Ruby programming language, without looking at it from an object- oriented point of view. Object orientation is an alternative to the procedural method of programming. Procedural code runs from top to bottom in a very simple and linear way. Object-oriented programming includes creating a set of classes, with associated methods (such as a class called Car, with a method called startEngine). We then initialize these classes by creating instance objects of the class in order to call the method.


Class Variable Object Orientation Procedural Method Instance Variable Current Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Matt Clements 2014

Authors and Affiliations

  • Matt Clements
    • 1
  1. 1.BucksUK

Personalised recommendations