Skip to content

Instantly share code, notes, and snippets.

@justuseapen
Created December 3, 2013 22:32
Show Gist options
  • Save justuseapen/7778800 to your computer and use it in GitHub Desktop.
Save justuseapen/7778800 to your computer and use it in GitHub Desktop.
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