From: Aldric Giacomoni Date: 2010-03-29T22:14:14+09:00 Subject: Re: Question: Dynamic code execution Thorsten Hater wrote: > Hi > > I'm currently writing a small game application in ruby. > The problem is, not all of the rules are static, meaning some > of the actions in the game are allowed to change them. > My question is, what is the best and safest way to implement this > feature? > Specifically, I have database of items, which may change parts of > the rules upon activation. Alright.. So store the rules in one or more hashes depending on what they are and how they can change, and refer to whatever key you need to read the rule (or setting) in the hash. That's one way. -- Posted via http://www.ruby-forum.com/.