How to generate UML diagrams from existing ruby code?

Hi,

thanks for reading. Till now, I’ve used railroad to visualize my
models. But as far as I can see, there’s no possibility to add
information about the model class methods. Methods are only added to a
diagram, if you visualize your controllers. Is there a way to change
this behavior?

I’ve looked out for something else and found ‘ruby-uml’, seems to
realize what I am looking for, but due to it’s real basic
documentation I can’t used it. Did you ever use it and can show me an
example?

Thank you for your answers!
ms

Take a look at Rubymine from JetBrains. They generate a really slick
E/R diagram that is quite close to the UML diagrams.

ms wrote:

Hi,

thanks for reading. Till now, I’ve used railroad to visualize my
models. But as far as I can see, there’s no possibility to add
information about the model class methods. Methods are only added to a
diagram, if you visualize your controllers. Is there a way to change
this behavior?

Open up Railroad’s intermediate DOT format and write on it. There are
also DOT
editors, not that I would trust them.

http://www.graphviz.org/Documentation/dotguide.pdf ← the language
reference

However, why are you doing this? Who will read the diagram? What value
will it
add? At my last Rails gig, we would print out a Railsroad once per big
project,
to see the current models, then we would scribble on it. What’s wrong
with that
technique?


Phlip
http://flea.sourceforge.net/resume.html

Hey,

thanks for all answers so far.

What’s wrong with that technique?

No, there’s nothing wrong with that. I just wanted railroad to also
add the model class methods to the diagram, this is possible just by
editing the DOT data(?) That would be nice, thanks for the hint!

cheers, ms

ms wrote:

No, there’s nothing wrong with that. I just wanted railroad to also
add the model class methods to the diagram, this is possible just by
editing the DOT data(?) That would be nice, thanks for the hint!

Unfortunately yes, if you type them all in. Models should have enough
methods
that this tedium will obviate the benefit of automatically generating
the graph.

You might ask Railroad’s author…


Phlip
http://flea.sourceforge.net/resume.html