[aklug] Ruby code blocks

From: Christopher Howard <choward@indicium.us>
Date: Thu May 27 2010 - 21:32:47 AKDT

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey Mike, or whoever else happens to be a Ruby guru: My latest project
has been a computer game I am writing in Ruby. I've got about 800 lines
of code so far.

Anyway, I was reading about Ruby code blocks, but it's all a bit hazy.
My questions:

1. Can you store executable code in the value part of a hash (err...
associative array)
2. If you did, how would you call the code?
3. If you executed this stored code, would it be possible when doing so
to pass in an object to the code that it could use?

I would appreciate any simple examples.

- --
Christopher Howard
http://linuxprogrammingforums.com
http://indicium.us
http://theologia.indicium.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkv/VX8ACgkQQ5FLNdi0BcV5QgCdG0bCwyYE8VP6+JccfuXG+/HY
cIkAnRbO56t4jPSWuXaT+MO7VbYF5mgI
=GDfw
-----END PGP SIGNATURE-----
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu May 27 21:35:30 2010

This archive was generated by hypermail 2.1.8 : Thu May 27 2010 - 21:35:30 AKDT