8000 GitHub - ubiregiinc/ubi_graphviz · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

32 watching

Forks

Repository files navigation

UbiGraphviz

  • このgemはなんらかのデータ構造を画像に出力します
    • dotコマンドを使います

対応しているモデル

  • Account

Requires

dot / graphviz

brew install graphviz

Installation

Add this line to your application's Gemfile:

gem 'ubi_graphviz', github: 'ubiregiinc/ubi_graphviz'

And then execute:

$ bundle

Usage

account = FactoryBot.create(:blank_account, login: :parent)
ubi_graphviz = UbiGraphviz::AccountModel.new(account, inspector: :id, filename: 'test')
ubi_graphviz.write # test.dot というファイルに出力する
ubi_graphviz.render # dotコマンドを使ってtest.pngという画像を出力する

Development

  • docker compose run --rm app bash
  • bundle install
  • bundle exec rake

出力例

  • account1 => account2 という関係の場合、acocunt1のparentがacocnut2となる
  • 網掛けになっている要素は引数で渡したアカウントを指している

img

img  

img  

img  

img

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

32 watching

Forks

Releases

Packages

Contributors

Languages

0