wtorek, 7 czerwca 2011

Ruby: umlify - generate UML model out of the source code

Recently I was looking for some way to generate the UML model out of the source code since I believe this is the best way to keep it up to day (and also the only way ;)). It seems that there is already a gem available that can be used for that purpose - it is called umlify.

In order to install it one needs to invoke:

# gem install umlify
Successfully installed sexp_processor-3.0.5
Successfully installed ruby_parser-2.0.6
Successfully installed umlify-1.2.6
3 gems installed
Installing ri documentation for sexp_processor-3.0.5...
Installing ri documentation for ruby_parser-2.0.6...
Installing ri documentation for umlify-1.2.6...
Updating class cache with 2570 classes...
Installing RDoc documentation for sexp_processor-3.0.5...
Installing RDoc documentation for ruby_parser-2.0.6...
Installing RDoc documentation for umlify-1.2.6...

That's it - now it is only to invoke it. If it is on your path the just invoke:
# umlify ./IpStatistics/*.rb

Afterwards the uml.png image containing the UML model will be generated. Below I enclose example part of the UML generated out of my IpStatistics project.

Brak komentarzy:

Prześlij komentarz