From: "Jesús Gabriel y Galán" Date: 2012-12-07T09:10:05+09:00 Subject: Re: Trying to get "translator" to work On Thu, Dec 6, 2012 at 11:16 PM, JD KF wrote: > Maybe I am just bad at this, but I'm having a hard time figuring out how > to implement what Jesus is saying into my if statements or code. > > Maybe I'm just bad at this (well, I sort of am, but I am trying to > learn). Could someone maybe give me a nudge as to how to implement it > into my code? > > You don't have to give me the full answer, but some help would be great > :/. I'm guessing the argument words is just a string, since you are gsubbing it, so let's call it sentence. What I'd do is split it first, then process each word separately, applying the piglatin rules: words = sentence.split(/\W/) # or some other variation words.map! do |word| # apply piglatin rules to word end Jesus.