johnrubythecat
johnrubythecat

Reputation: 1313

JavaScript to Ruby translator framework

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

Answers (2)

Vasiliy Ermolovich
Vasiliy Ermolovich

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

Anderson Green
Anderson Green

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

Related Questions