Forked from iandonovanhock/gist:ebd90b3f9c7bf677c82e
Last active
August 29, 2015 14:20
-
-
Save aviflombaum/637bf8a96ff017f33518 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 School | |
@@school_hash = {} | |
@@school_count = 0 | |
def initialize(school, location, ranking) | |
@school = school | |
@@school_hash[:school] = school | |
@@school_count += 1 | |
end | |
def self.all | |
@@school_hash | |
end | |
def self.count | |
@@school_count | |
end | |
def self.reset_all = (0) | |
@@school_count = 0 | |
# Though I imagine you should also reset @@school_hash | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment