How To Use The Singleton Pattern In Ruby (And Why You Should Avoid It)
Have you ever wanted to create a class that can only have one instance? Yes? No? Maybe? Well… That’s exactly what the singleton pattern is. There isn’t a problem with that. But some people call this an anti-pattern because it can be used as an excuse for bad design. Let’s have a look at a … Read more