[Pharo-project] [squeak-dev] File out as Ruby - Possible ?

Cédrick Béler cdrick65 at gmail.com
Wed Feb 10 13:12:27 EST 2010


Ok here are some questions to see if I'm on the right track.

>From what I've guessed I need to create my own formatter
(RubyFormatter) by basically rewriting all private-formating methods
(am I right here ?).

Then, I use the parser and the RubyFormatter. But what I want is
export a package, ie. classes with their methods and extension
methods. I can't parse directly a full class nor a package... can I
directly ? I guess not

So I need to parse each class definition (and class class definition),
format them,  then parse/format each method source (probably better to
get the code expressions from the MCWorkingCopy or PackageInfo I
guess)...

RBParser parseExpression: MyClass definition.

Then something like:
methodsRefs do: [:mr | RBParser parseMethod: mr sourceCode]

...
I'll try later but if you have any comments... :)

TIA

Cédrick




More information about the Pharo-dev mailing list