RubyGems Navigation menu

GraphvizR 0.5.1

Graphviz wrapper for Ruby. This can be used as a common library, a rails plugin and a command line tool. == FEATURES/PROBLEMS: GraphvizR is graphviz adapter for Ruby, and it can: * generate a graphviz dot file, * generate an image file by means of utilizing graphviz, * interprete rdot file and generate an image file, * and, generate a graph image file in rails application as a rails plugin. == SYNOPSYS: === Command Line: bin/graphviz_r sample/record.rdot === In Your Code: This ruby code: gvr = GraphvizR.new 'sample' gvr.graph [:label => 'example', :size => '1.5, 2.5'] gvr.beta [:shape => :box] gvr.alpha >> gvr.beta (gvr.beta >> gvr.delta) [:label => 'label1'] gvr.delta >> gvr.gamma gvr.to_dot replies the dot code: digraph sample { graph [label = "example", size = "1.5, 2.5"]; beta [shape = box]; alpha -> beta; beta -> delta [label = "label1"]; delta -> gamma; } To know more detail, please see test/test_graphviz_r.rb === On Rails : <b>use _render :rdot_ in controller</b> def show_graph render :rdot do graph [:size => '1.5, 2.5'] node [:shape => :record] node1 [:label => "<p_left> left|<p_center>center|<p_right> right"] node2 [:label => "left|center|right"] node1 >> node2 node1(:p_left) >> node2 node2 >> node1(:p_center) (node2 >> node1(:p_right)) [:label => 'record'] end end <b>use rdot view template</b> class RdotGenController < ApplicationController def index @label1 = "<p_left> left|<p_center>center|<p_right> right" @label2 = "left|center|right" end end # view/rdot_gen/index.rdot graph [:size => '1.5, 2.5'] node [:shape => :record] node1 [:label => @label1] node2 [:label => @label2] node1 >> node2 node1(:p_left) >> node2 node2 >> node1(:p_center) (node2 >> node1(:p_right)) [:label => 'record'] == DEPENDENCIES: * Graphviz (http://www.graphviz.org) == TODO: == INSTALL: * sudo gem install graphviz_r * if you want to use this in ruby on rails * script/plugin install http://technohippy.net/svn/repos/graphviz_r/trunk/vendor/plugins/rdot == LICENSE: (The MIT License)

Gemfile:
= Copier Copié!

installation:
=

Versions:

  1. 0.5.1 - March 18, 2007* (13,5 ko)
  2. 0.5.0 - March 10, 2007* (12,5 ko)
  3. 0.4.0 - February 25, 2007* (14 ko)
  4. 0.3.2 - February 20, 2007* (14 ko)
  5. 0.3.1 - February 18, 2007* (12 ko)
Voir toutes les versions (9)

Dépendances de Runtime (1):

hoe >= 1.2.0

Propriétaires:

Auteurs:

  • ANDO Yasushi

Total de contrôle SHA 256:

85f4b9a730891fe1b1bbd1c81fff5f1aab9b2df6656b7f5848b08c94d9692fbf

Total de téléchargements 37 977

Pour cette version 7 607

License:

aucune

Version de Ruby requise: > 0.0.0

Liens: