Hi --

On Wed, 4 Feb 2009, Matthew Moss wrote:

>
> On Feb 3, 2009, at 3:39 PM, Jason Shelton wrote:
>
>> 
>> Hello,
>> 
>> I currently have an array of strings.  Let's say, for example, my array 
>> contains the following:
>>
>>                           ['one', 'two', 'three']
>> 
>> Each element in my array is the name of a function in my program.  I want 
>> to call the functions, using the array element.  So for example, lets say 
>> that my array is named 'numArray'.  I want to call the function in my 
>> program named 'one'.  I am now trying numArray[0].  Is there a way to make 
>> the numArray[0] be recognized as 'one' and call the function?  If my 
>> question is not clear, I can elaborate.  Thanks in advance for all help.
>
>
> Convert the string to a symbol and send it to the appropriate object.

No need to convert it. send will take a string.


David

-- 
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2)

http://www.wishsight.com => Independent, social wishlist management!