graphviz_r on Rails 2
Posted by Technohippy Sat, 17 Feb 2007 01:18:00 GMT
graphviz_rプラグインでrdotテンプレートも使えるようにしてみました。 プラグイン入れて、拡張子 rdot でビューを作ればおk。 無論、インスタンス変数も受け渡し可。
# controllers/rdot_gen_controller.rb
class RdotGenController < ApplicationController
def index
@label1 = "<p_left> left|<p_center>center|<p_right> right"
@label2 = "left|center|right"
end
end
# views/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']

[url=http://online.abiou.org/it/football-field-pictures.htm]Immagini Del Campo Di Gioco del calcio[/url] * [url=http://online.abiou.org/football-field-pictures.htm]Football field pictures[/url] * [url=http://online.abiou.org/es/gemeente-den-bosch.htm] Guarida Bosch De Gemeente[/url] Immagini Del Campo Di Gioco del calcio | Football field pictures | Guarida Bosch De Gemeente http://online.abiou.org/it/football-field-pictures.htm http://online.abiou.org/football-field-pictures.htm http://online.abiou.org/es/gemeente-den-bosch.htm
just testing mate.