Types of Design Patterns
Creational, structural and behavioural
Elements of the Builder Pattern

Elements of the Factory Pattern

Example of Factory Pattern
An abstract factory for a monster class, and three concrete factories according to the difficulty of the generated monsters
Elements of an Abstract Factory pattern

Example of Abstract Factory pattern
In a game, factories of different monsters, with different difficulties
Or UI component factories, where there are two factories, one for Windows and one for macOS, each capable of creating different types of componentes.
Elements of the (Object) Adapter Pattern

Elements of the Composite Pattern

Elements of the Decorator Pattern

Elements of the Observer pattern

Elements of the Facade Pattern

Elements of the Command pattern

Elements of a Strategy pattern

Ruby method equivalent of __init__
def initialize(args)...end
Para exponer atributos en Ruby, es necesario usar…
attr_accesor, attr_reader o attr_writer para crear getters y setters, o implementarlos a mano