This is more out of curiosity ... I've seen some examples of what I want to do, but in Perl. I tried to find a way to do the same in ruby, but to no avail.
I want a function to generate an MD5 hash from a word passed as an argument. The intent is to send this argument to the ruby interpreter, and then use the return in function. I made a "pseudo-code" to illustrate what I want:
function generate_hash {
# Enviar o argumento para o interpretador e obter o retorno.
ruby "Digest::MD5.hexdigest($1)"
}
Does anyone have any idea how I could do this integration?