Ruby to dot transpiler.
- Java 7: i.e. install using jenv:
$ curl -L -s get.jenv.io | bash
jenv install java 1.7.0_75
- JRuby: i.e. install using rvm
rvm install jruby
rvm use jruby
Download repo and install gem:
git clone https://github.com/adrianmarino/ruml.git
cd ruml
rake install:local
Or include in your Gemfile:
gem 'ruml', git: 'https://github.com/adrianmarino/ruml.git', branch: 'master'
require 'ruml'; Ruml::Transpiler::Ruby2Dot.from_path('example/input.rb').compile
Next command read an input ruby file and generate an output in dot language. Then redirect the output to xdot command. xdot is a dot viewer.
bin/ruby2dot example/input.rb | xdot
xdot output: