Skip to content

Instantly share code, notes, and snippets.

@erubboli
Created August 27, 2010 09:31
Show Gist options
  • Save erubboli/553102 to your computer and use it in GitHub Desktop.
Save erubboli/553102 to your computer and use it in GitHub Desktop.
class Logger
include Singleton
def warning( msg )
#...
end
end
a = Logger.instance
b = Logger.instance
a.object_id #=> 70091834349580
b.object_id #=> 70091834349580
c = Logger.new #=> NoMethodError: private method `new'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment