> Design Patterns > Factory Method > Factory Method Design Pattern In Ruby

Factory Method Design Pattern In Ruby

Factory Method design pattern in Ruby using subclass to create object of a derived class of another class which is not known.


Factory Method design pattern In Ruby

Output

Inside ConcreteProduct:UseProduct()


Suresh Kumar Srivastava is founder of online learning site coursegalaxy.com and author of popular books C In Depth, Data Structures Through C In Depth. He has 18+ years experience in industry and worked on architecture and design of multiple products. This article Factory Method Design Pattern In Ruby is from his Design Patterns course.