Skip to content

Instantly share code, notes, and snippets.

@kodyclemens
Last active November 15, 2018 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kodyclemens/58ea2e1ba9ed218bc9495e3be277fa1d to your computer and use it in GitHub Desktop.
Save kodyclemens/58ea2e1ba9ed218bc9495e3be277fa1d to your computer and use it in GitHub Desktop.
class Doctor
attr_accessor :name
def initialize(name)
@name = name
@@all << self
end
def new_appointment(patient, date)
# given a date and a patient, creates a new appointment
Appointment.new(date, patient, self)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment