Changeset 19232
- Timestamp:
- 09/12/08 18:21:18 (4 months ago)
- Location:
- lang/ruby/ymldot
- Files:
-
- 2 modified
-
README (modified) (3 diffs)
-
lib/ymldot.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/ymldot/README
r19163 r19232 3 3 == Description 4 4 5 Can describe ERD in a form of ".yml".6 ERD method use IDEF1X. (see http://www.idef.com/IDEF1x.html) 7 ".yml" file to ".dot" file. ".dot" is a language used in "graphviz".5 Can describe ERD in a form of ".yml". 6 ERD method use IDEF1X. 7 ".yml" file to ".dot" file. ".dot" is a language used in "graphviz". 8 8 9 9 == Installation 10 10 (1) if not install graphviz, type following. 11 $ apt-get install graphviz11 * $ apt-get install graphviz 12 12 (2) get ymldot. 13 $ gem install ymldot13 * $ gem install ymldot 14 14 15 15 == Option … … 20 20 * config 21 21 * font 22 Please set the font name that You want to use.22 * Please set the font name that You want to use. 23 23 * tables 24 24 * name 25 table name25 * table name 26 26 * columns 27 enumerate column names27 * enumerate column names 28 28 * foreginkeys 29 29 * has_many 30 30 * has_one 31 31 * has_many_and_belongs_to 32 same meaning the relation of ActiveRecord.33 enumerate ref table name.32 * same meaning the relation of ActiveRecord. 33 * enumerate ref table name. 34 34 * polymorphic 35 35 * name 36 36 * type 37 37 * tables 38 target table name.38 * target table name. 39 39 40 40 * category 41 41 * label 42 category name set. and set frame.42 * category name set. and set frame. 43 43 * table 44 nested table.44 * nested table. 45 45 46 46 == Sample … … 91 91 92 92 * please type 93 $ dot -Tpng sample.dot -o sample.png93 $ dot -Tpng sample.dot -o sample.png 94 94 95 95 == Copyright 96 96 97 Author:: nari <authorNari@gmail.com> 98 Copyright:: Copyright (c) 2008 nari 99 License:: Ruby's 97 * Author:: nari <authorNari@gmail.com> 98 * Copyright:: Copyright (c) 2008 nari 99 * License:: Ruby's 100 101 == Link 102 * ((<ymldot-project|URL:http://rubyforge.org/projects/ymldot>)) -
lang/ruby/ymldot/lib/ymldot.rb
r19163 r19232 179 179 keys.each do |rel| 180 180 @entity_dict[tname].foreignkeys << "#{rel["name"]}ID(FK)" if key = rel["name"] 181 @entity_dict[tname].columns <<"#{rel["type"]}(type)" if key = rel["type"]181 @entity_dict[tname].columns.unshift "#{rel["type"]}(type)" if key = rel["type"] 182 182 rel["tables"].each do |t| 183 183 @one_relations << {:self => @entity_dict[t], :have => @entity_dict[tname] }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)