Created
August 27, 2010 09:31
-
-
Save erubboli/553102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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