Created
June 5, 2016 12:17
-
-
Save codesword/cb793046f8083557f201db016bbbc51a 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
class Director | |
attr_reader :training_team, :fellows | |
delegate :train_new_fellow, :train_new_fellow, to: training_team | |
delegate :size, :[], :<<, to: fellows | |
def initialize | |
@training_team = TrainingTeam.new | |
@fellows = [] | |
end | |
end | |
director_of_training = Director.new | |
director_of_training.train_new_fellow("Aboki") # => trains Aboki for six months | |
director_of_training << "Aboki Brother" # => pushes Aboki Brother to director of training to be trained. | |
director_of_training[0] # => returns first fellow in in training. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment