Created
June 1, 2014 20:49
-
-
Save Murphydbuffalo/3d652c298e6cd3a57748 to your computer and use it in GitHub Desktop.
Solution to the constructors mini-challenge (OOD reading)
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
class Television # A TV plays many channels and many shows of those channels. | |
def initialize(channels=[]) | |
@channels = channels | |
end | |
end | |
class Channels #A channel may have many shows and belong to many TVs. | |
def initialize(shows=[]) | |
@shows = shows | |
end | |
end | |
class Shows#Shows belong to (potentially) many channels and play on many TVs | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment