RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

The Singleton Pattern in Ruby (video)

The Singleton Pattern helps with restricting the number of instances a class can create to just one and gives you a global way of accessing the instance.

This can be useful when you need to manage access to some resource, like a configuration object, or a logger.

Youtube link: https://youtu.be/IP3I_t2rR6A

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in