Created
March 25, 2015 01:14
-
-
Save jshawl/2f0ed86f6ed6a103d917 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 Apartment | |
@@all = [] | |
def initialize | |
@@all << self | |
end | |
def self.count | |
@@all.length | |
end | |
end | |
Apartment.new | |
Apartment.new | |
Apartment.new | |
p Apartment.count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment