T
Trevoke
I think this is what I want to do (maybe I'm thinking about it wrong):
a = Doctor.new
b = Doctor.new
I want both 'a' and 'b' to have access to:
modalities = ['US', 'CR', 'CT', 'MR']
The array 'modalities' is not hard-coded, but generated from a
database query. I don't want to query the database every time I create
a new instance of Doctor - so how can I do it so that every instance
of Doctor shares the same array, only created once?
Is this the part where 'modules' and 'classes' come into question and
interact?
a = Doctor.new
b = Doctor.new
I want both 'a' and 'b' to have access to:
modalities = ['US', 'CR', 'CT', 'MR']
The array 'modalities' is not hard-coded, but generated from a
database query. I don't want to query the database every time I create
a new instance of Doctor - so how can I do it so that every instance
of Doctor shares the same array, only created once?
Is this the part where 'modules' and 'classes' come into question and
interact?