Class And Modules

A Ruby class is very similar to the other programming languages class structures. They allow for code to be created within a single object that can be reused etc, the code can have its own separate block of variables/methods for that instance of the required task. It is able to be inherited and extended which is different to a module which only allows for the created module to have methods and constant variables.

module SillyModule

Leave a Reply

Your email address will not be published. Required fields are marked *