[aklug] Re: Ruby code blocks

From: Christopher Howard <choward@indicium.us>
Date: Fri May 28 2010 - 19:38:49 AKDT

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

On 05/28/10 05:32, Christopher Howard wrote:
> 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.
>

http://www.linuxquestions.org/questions/programming-9/ruby-code-blocks-810738/

- --
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/

iEYEARECAAYFAkwAjEkACgkQQ5FLNdi0BcVcHgCeMtwN0n4Vw0AkeEqmS3crP/zM
bJIAn1kYu5YMSfO5wVeI2iKrrBpKOYbV
=Jz6T
-----END PGP SIGNATURE-----
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Fri May 28 19:41:17 2010

This archive was generated by hypermail 2.1.8 : Fri May 28 2010 - 19:41:17 AKDT