Created
December 3, 2013 22:32
-
-
Save justuseapen/7778800 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'pry' | |
class Car | |
class Make < Car | |
@@makes = [] | |
def self.add_make(make) | |
@@makes << make | |
end | |
def self.valid_makes | |
@@makes | |
end | |
class Model < Make | |
@@models = [] | |
def self.add_model(model) | |
@@models << model | |
end | |
def self.valid_models | |
@@models | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment