On 03/28/2013 01:00 PM, Jeremy Henderson wrote:
> Hello all! This is my first post! I started learning Ruby about 3 weeks
> ago and have a personal project I would like to do, so I was wondering
> if someone could help me out a bit, so I can get it started.
>
> I would like to have a request made by Ruby to the user for some text.
> Then Ruby would take their input and split the text up by every
> individual character and assign it a new value based on what letter it
> is.
>
> For instance if:
>
> "A" = [A,B,C,D,E,F] "B" = [G,H,I,J,K,L]
> "C" = [M,N,O,P,Q,R] "D" = [S,T,U,V,W,X,Y,Z]
>
> So with the info above, Ruby would look at a sentence like, "Hello
> World" and it would say, "Ok, "H" is in "B's" array, so it's new value
> is "B"... and would do that for each character in the text. Then, when
> it's done, it would show the result after it's been put together. So the
> final product would be, "BABBC DCCBA". Spaces being accounted for as
> they are shown in the original text.
>
> If you know how this would be done, I would greatly appreciate your
> help. Otherwise, if you know a portion of how it might work, I would
> appreciate that as well. I'm grateful for any help anyone could provide.
>
> Thank you

Welcome to Ruby!

What parts have you already written? What parts are you having trouble with?

Regis' answers are not very newbie-friendly nor idiomatic and do not 
make total sense, so feel free to try a different approach.

-Justin