<p>The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object instance. Although I know how to code the singleton pattern in C++ and Java, I was wondering if anyone know how to implement it in Ruby?</p>

Use the singleton module:
```
```
class Clazz
  include Singleton
end
```
```
See
http://www.ruby-doc.org/stdlib/libdoc/singleton/rdoc/index.html
for more info.