Ruby2Ruby

J

Juston

I've been reading a lot about ParseTree and Ruby2Ruby for a project
I'm working on simply not getting it.

Im running 1.8.6 and have the Ruby2Ruby, ParseTree and ruby_parser
gems installed but I simply can't get them to work. I suspect it might
be that I may be using dated documentation. I've seen Ruby2Ruby used
in a couple online tutorials and it usually works like this:

require "ruby2ruby"

class SomeClass
...
end

puts Ruby2Ruby.translate(SomeClass)

...and this would output the code for "SomeClass." However for me it
says method "translate" was not defined. I did some more searching and
saw some alternative demos where you would call something like
"SomeClass.to_ruby" or "ParseTree.translate(SomeClass)" but I can't
get these to fly either. Any idea what I might be doing wrong?

Also, since ParseTree is actually borken on 1.9 (with no real plans to
fix it) it seems using Ruby2Ruby and ruby_parser would be a better
idea, am I right about that? Thanks in advance for you input!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,938
Members
47,473
Latest member
pioneertraining

Latest Threads

Top