Reputation: 1313
Anyone know of such a framework? Preferably an open-source project, but first, anything at all. A google search proved fruitless.
Upvotes: 0
Views: 2047
Reputation: 24617
Tenderlove works on something like that: https://tenderlovemaking.com/2007/04/15/converting-javascript-to-ruby-with-rkelly.html
But the last version was in the 2009 on the rubyforge and maybe it's dead
Upvotes: 2
Reputation: 31840
Unfortunately the link in the other answer is broken, but I have written another translator to convert a small subset of JavaScript into Ruby.
This a function in JavaScript:
function add(a,b){
return a+b;
}
and this is the translator's output in Ruby:
def add(a,b)
return a+b
end
Upvotes: 1