Skip to content

iiwo/class_diagram

Repository files navigation

ClassDiagram

🚧 🚧 WIP 🚧 🚧

Installation

Add this line to your application's Gemfile:

gem 'class_diagram', git: 'https://github.com/iiwo/class_diagram', group: 'development'

And then execute:

$ bundle install

Usage

with cli:

> bundle exec class_diagram help diagram

Usage:
  class_diagram diagram

Options:
  -p, [--path=PATH]                # path to Ruby class file
  -o, [--output=OUTPUT]            # target output for the diagram exporter
                                   # Default: console
                                   # Possible values: console, file
  -f, [--format=FORMAT]            # format of the diagram output
                                   # Default: text
                                   # Possible values: text, html
  -e, [--export-path=EXPORT_PATH]  # path for the file output (only used with file output)

Generate class diagram

example:

 bundle exec class_diagram diagram -p app/controllers/some_controller.rb -f html -o file -e ./diagrams/some_controller.html

with Rails console:

ClassDiagram.diagram(path: 'app/path/to/your/class.rb')

About

Generate class diagrams for Rails apps

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published