Send variables from Ruby script to AppleScript

Hello everyone. I need a bit of help. I’m trying to send a string of text from a ruby script to a function in an Applescript, and then get the result of the AppleScript back. An example of the function I want to send the string to would be:

on process_command(string1, string2)
say “string1” using “string2”
return “I said what you wanted me to say”
end process_command

So the Ruby script would send string1 and string2 to this function in the AppleScript, and then it would receive back that return as a string. Thanks

Model: Mac Mini 2010
AppleScript: Lion 10.7.2
Browser: Firefox 8.0
Operating System: Mac OS X (10.7)