Class: DataMapper::Visualizer::Rake::GraphVizTask
- Defined in:
- lib/dm-visualizer/rake/graphviz_task.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#relational ⇒ Object
readonly
The relational diagram GraphViz visualizer.
-
#schema ⇒ Object
readonly
The schema diagram GraphViz visualizer.
Instance Method Summary collapse
-
#define ⇒ Object
Defines the
dm:doc:graphviz
namespace. -
#initialize(options = {}) {|task| ... } ⇒ GraphVizTask
constructor
Creates a new
dm:doc:graphviz
task.
Constructor Details
#initialize(options = {}) {|task| ... } ⇒ GraphVizTask
Creates a new dm:doc:graphviz
task.
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/dm-visualizer/rake/graphviz_task.rb', line 29 def initialize(={}) @relational = GraphViz.new(.merge( :naming => :relational, :file => 'doc/relational_diagram' )) @schema = GraphViz.new(.merge( :naming => :schema, :file => 'doc/schema_diagram' )) super end |
Instance Attribute Details
#relational ⇒ Object (readonly)
The relational diagram GraphViz visualizer
10 11 12 |
# File 'lib/dm-visualizer/rake/graphviz_task.rb', line 10 def relational @relational end |
#schema ⇒ Object (readonly)
The schema diagram GraphViz visualizer
13 14 15 |
# File 'lib/dm-visualizer/rake/graphviz_task.rb', line 13 def schema @schema end |
Instance Method Details
#define ⇒ Object
Defines the dm:doc:graphviz
namespace.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/dm-visualizer/rake/graphviz_task.rb', line 46 def define super do namespace :graphviz do desc 'Generates a GraphViz relational diagram of the DataMapper Models' task :relational do @relational.visualize! end desc 'Generates a GraphViz schema diagram of the DataMapper Models' task :schema do @schema.visualize! end end task :graphviz => ['graphviz:relational', 'graphviz:schema'] end end |