[aklug] Re: Ruby code blocks

From: barsalou <barjunk@attglobal.net>
Date: Sat May 29 2010 - 18:56:39 AKDT

I'm not sure of the use case for storing code in a hash, seems fraught =20
with opportunity.

If you really want to get some good feedback, posting this to the ruby =20
list seems like a good idea.

Mike B.

Quoting Christopher Howard <choward@indicium.us>:

> -----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
> =3DGDfw
> -----END PGP SIGNATURE-----
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat May 29 18:56:50 2010

This archive was generated by hypermail 2.1.8 : Sat May 29 2010 - 18:56:50 AKDT