A command-line utility to generate Graphviz graphs from a set of objects
@see #run @since 0.6.0
The set of objects to include in the graph.
The options parsed out of the commandline. Default options are:
:format => :dot
Creates a new instance of the command-line utility
# File lib/yard/cli/graph.rb, line 33 def initialize super @use_document_file = false @options = GraphOptions.new options.reset_defaults options.serializer = YARD::Serializers::StdoutSerializer.new end
# File lib/yard/cli/graph.rb, line 41 def description "Graphs class diagram using Graphviz" end
Runs the command-line utility.
@example
grapher = Graph.new grapher.run('--private')
@param [Array<String>] args each tokenized argument
# File lib/yard/cli/graph.rb, line 51 def run(*args) parse_arguments(*args) Registry.load contents = objects.map do |o| o.format(options.merge(:serialize => false)) end.join("\n") opts = {:type => :layout, :contents => contents} options.update(opts) Templates::Engine.render(options) end