Skip to content

Instantly share code, notes, and snippets.

@codesword
Created June 5, 2016 12:17
Show Gist options
  • Save codesword/cb793046f8083557f201db016bbbc51a to your computer and use it in GitHub Desktop.
Save codesword/cb793046f8083557f201db016bbbc51a to your computer and use it in GitHub Desktop.
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