Practice Ruby syntax
- The Well-Grounded Rubyist, 3rd Edition
- Beginning Ruby
- Data Types
- Array
- Hashes
- Class
- Object
- Symbols
- Range Operators
- String
- Control Flow
- Getter Setter
- Attribute Accessor
- Encapsulation
- Inheritance
A Module is a collection of methods, constants, and class variables. Modules are defined as a class, but with the module keyword not with class keyword.
- You cannot inherit modules or you can’t create a subclass of a module.
- Objects cannot be created from a module.
- Modules are used as namespaces and as mixins.
- All the classes are modules, but all the modules are not classes.
- The class can use namespaces, but they cannot use mixins like modules.
- The name of a module must start with a capital letter.