Project

rbuml

0.0
No commit activity in last 3 years
No release in over 3 years
rbuml provides classes and a dsl for representing uml class relationships that can be rendered as a uml class diagram using graphviz dot
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

About

Gem Version

rbuml is a domain-specific labguage on top of Ruby for generating UML class diagrams using Graphviz dot.

Installing

On linux and unix-like system, run:

gem install rbuml

You will also need to install the graphviz dot utility (ex. apt-get install graphviz.)

See ruby-graphviz for further instructions if you're having trouble.

Example

Download example.rb and run rbuml example.rb

This should produce "example.png" containing:

example image

"example.rb":

uml_class 'ClassA' do
	attribute "foo", "int"
	attribute "bar", "bool"
	implements 'InterfaceA'
end

uml_class 'ClassB' do
	extends 'ClassA'
	attribute 'c', :ClassC, :private
	relationship 'ClassC', :has
	note <<-eos
		ClassB probably doesn't do much
		with c, but let's have one anyway 
	eos
end

uml_class 'ClassC'

uml_class 'InterfaceA' do
	kind :interface
	method 'add_point', :bool do
		argument 'x', :int
		argument 'y', :int
	end
end

save "example.png"