From: Andrew Wagner Date: 2010-10-28T23:37:48+09:00 Subject: yaml, erb, and behavior trees --001517447efa0849bd0493ae492b Content-Type: text/plain; charset=UTF-8 Hi all, So, last week, I announced my new behavior tree library. Since them, I've started trying to apply them to ruby-warrior, for fun, and to improve the library. I'm quickly realizing that I need an even easier front end for it. So, I'm thinking something like this would be useful: select make_empty: - - empty: <%= lambda {|e| e.empty? } %> - sequence: - pop: <%= lambda {|e| e.pop? } %> - make_empty Yup, that's YAML, with ERB embedded in it. How hard would it be to take a structure like this and turn it into a sensible hash/array structure? Would I be better off just leaving the lambdas as strings, and eval'ing them? --001517447efa0849bd0493ae492b--