Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianmarino/ruml
A ruby to dot transpiler. Useful to generate classes hierarchy diagrams from ruby source
https://github.com/adrianmarino/ruml
antlr4 dot jruby
Last synced: 1 day ago
JSON representation
A ruby to dot transpiler. Useful to generate classes hierarchy diagrams from ruby source
- Host: GitHub
- URL: https://github.com/adrianmarino/ruml
- Owner: adrianmarino
- Created: 2016-02-03T01:21:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T02:53:09.000Z (almost 9 years ago)
- Last Synced: 2023-02-27T13:46:48.422Z (almost 2 years ago)
- Topics: antlr4, dot, jruby
- Language: Java
- Homepage:
- Size: 2.89 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/adrianmarino/ruml.svg?branch=master)](https://travis-ci.org/adrianmarino/ruml)
[![License](http://img.shields.io/:license-mit-blue.svg)](http://badges.mit-license.org)# Ruml
Ruby to dot transpiler.
### Requisites
* Java 7: i.e. install using jenv:
```bash
$ curl -L -s get.jenv.io | bash
jenv install java 1.7.0_75
```* JRuby: i.e. install using rvm
```bash
rvm install jruby
rvm use jruby
```### Install
Download repo and install gem:
```bash
git clone https://github.com/adrianmarino/ruml.git
cd ruml
rake install:local
```
Or include in your Gemfile:```ruby
gem 'ruml', git: 'https://github.com/adrianmarino/ruml.git', branch: 'master'
```### Use
#### Generate dot diagram from irb
```ruby
require 'ruml'; Ruml::Transpiler::Ruby2Dot.from_path('example/input.rb').compile
```#### Generate dot diagram with ruby2dot command
Next command read an [input ruby file](example/input.rb) and generate an output in dot language. Then redirect the output to xdot command.
xdot is a dot viewer.
```bash
bin/ruby2dot example/input.rb | xdot
```
xdot output:![alt Models Diagram](https://raw.githubusercontent.com/adrianmarino/ruml/master/example/output.png)