Render dot depending on format

Property definitions

nitc $ CmdGraph :: render
	# Render `dot` depending on `format`
	fun render: nullable Writable do
		var dot = self.dot
		if dot == null then return null
		if format == "svg" then
			var proc = new ProcessDuplex("dot", "-Tsvg")
			var svg = proc.write_and_read(dot.write_to_string)
			proc.close
			proc.wait
			return svg
		end
		return dot
	end
src/doc/commands/commands_graph.nit:46,2--58,4

nitc $ CmdUML :: render
	redef fun render do
		var uml = self.uml
		if uml == null then return null
		if mentity isa MClass then
			dot = uml.generate_class_uml.write_to_string
		else if mentity isa MModule then
			dot = uml.generate_package_uml.write_to_string
		end
		return super
	end
src/doc/commands/commands_graph.nit:118,2--127,4

nitc $ CmdInheritanceGraph :: render
	redef fun render do
		var graph = self.graph
		if graph == null then return ""
		self.dot = graph.draw(pdepth, cdepth).to_dot
		return super
	end
src/doc/commands/commands_graph.nit:167,2--172,4