Generating Ruby output

18 views
Skip to first unread message

Tim Adamson

unread,
Nov 14, 2011, 7:09:18 AM11/14/11
to umple...@googlegroups.com
Hi all,

First up, good work on umple. I just stumbled across this project a few days ago and I have to say it looks pretty awesome.

I was wondering if there's meant to be command line options to get umple.jar to output Ruby code?

I've manage to get Ruby output by changing the default in UmpleInternalParser:postTokenCoreAnalysis and recompiling but a brief search through the code gives me the impression there's meant to be a "-generate" command line option that's not fully implemented.

Cheers,
Tim

Timothy Lethbridge

unread,
Nov 14, 2011, 8:18:06 AM11/14/11
to Tim Adamson, umple...@googlegroups.com
Hi Tim,

To generate code in a supported language, add a "generate" line to the
beginning of the code. You can actually generate more than one language at
a time this way.

So, to generate Ruby add

generate Ruby;

as the first line.

Please note: Our Java and PHP development tends to have more attention
paid to them.

The code generated in Ruby needs some work to make its style better match
what a Ruby expert would want to write.

If you want you can also make Umple output the Ruby in a different
directory, by adding a parameter to the generate statement thus:

generate Ruby "gen-Ruby";

(the quotes are required)

Hope this helps.

You are right: I believe there should be a command line option for this as
well. However the above is the way it currently works.

- Tim

> --
> You received this message because you are subscribed to the Google Groups
> "Umple-Help" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/umple-help/-/JvkRD1Xbo88J.
> To post to this group, send an email to umple...@googlegroups.com.
> To unsubscribe from this group, send email to
> umple-help+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/umple-help?hl=en-GB.
>
>


Timothy C. Lethbridge, PhD, P.Eng., I.S.P., CSDP
Professor of Software Engineering and Computer Science
/ Professeur Titulaire de g�nie logiciel et d'informatique
Facult� de genie / Faculty of Engineering
University of Ottawa / Universit� d'Ottawa
Tel: 613-562-5800x6685 Fax: 613-562-5664 Mobile: 613-252-1850
http://www.eecs.uottawa.ca/~tcl

Tim Adamson

unread,
Nov 14, 2011, 11:01:07 AM11/14/11
to umple...@googlegroups.com, Tim Adamson
Thanks Tim, this is perfect.
Reply all
Reply to author
Forward
0 new messages