--0016361e891ea42b12046f4da0c8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
class Doctor
def modalities
@@modalities || our stuff
end
end
-chris
On Wed, Jul 22, 2009 at 11:45 AM, Trevoke <trevoke / gmail.com> wrote:
> I think this is what I want to do (maybe I'm thinking about it wrong):
>
> a octor.new
> b octor.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?
>
>
--0016361e891ea42b12046f4da0c8--