Skip to content

Instantly share code, notes, and snippets.

View kodyclemens's full-sized avatar
🏠
Working remote

Kody kodyclemens

🏠
Working remote
View GitHub Profile
@kodyclemens
kodyclemens / History|-10230630|entries.json
Last active October 17, 2022 21:08
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/kody/dev/hackathon2022-profile/server/react-ui/node_modules/%40ant-design/icons/lib/icons/DragOutlined.d.ts","entries":[{"id":"lrcn.ts","source":"Workspace Edit","timestamp":1652221783843}]}
[1] pry(main)> Appointment.all
# Our first appointment using the appointment class to create an appointment
=> [#<Appointment:0x007fd92022b2e8
@date="2018-11-15",
@doctor=#<Doctor:0x007fd92022b478 @name="Dr. James Johnson">,
@patient=#<Patient:0x007fd92022b428 @name="Kody Clemens">>,
# Our second appointment, created using the patient instance method
#<Appointment:0x007fd91fbcd3b0
require "pry"
class Appointment
attr_accessor :date, :patient, :doctor
@@all = []
def initialize(date, patient, doctor)
@date = date
@patient = patient
@doctor = doctor
class Patient
attr_accessor :name
def initialize(name)
@name = name
@@all << self
end
def new_appointment(doctor, date)
Appointment.new(date, self, doctor)
class Appointment
attr_accessor :date, :patient, :doctor
@@all = []
def initialize(date, patient, doctor)
@date = date
@patient = patient
@doctor = doctor
@@all << self
end
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
objc[81924]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
objc[1942]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork()was called.
objc[1942]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process.Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.