From 05cbd2de6c5a17ec7f0d30b888d4fbbe95bfbb05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Christophe=20Beaupr=C3=A9?= Date: Fri, 28 Nov 2014 12:14:53 -0500 Subject: [PATCH] neo_doxygen: Quiet warning about the old-style `init`. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Christophe Beaupré --- contrib/neo_doxygen/src/model/graph.nit | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/contrib/neo_doxygen/src/model/graph.nit b/contrib/neo_doxygen/src/model/graph.nit index 43edfa4..98244eb 100644 --- a/contrib/neo_doxygen/src/model/graph.nit +++ b/contrib/neo_doxygen/src/model/graph.nit @@ -34,10 +34,13 @@ class NeoGraph end end -# The project’s graph. +# A project’s graph. class ProjectGraph super NeoGraph + # The project’s name. + var project_name: String + # The node reperesenting the project. # # Once the project’s graph is initialized, this node must not be edited. @@ -49,11 +52,11 @@ class ProjectGraph # Initialize a new project graph using the specified project name. # # The specified name will label all nodes of the project’s graph. - init(name: String) do - project.labels.add(name) + init do + project.labels.add(project_name) project.labels.add("MEntity") project.labels.add("MProject") - project["name"] = name + project["name"] = project_name all_nodes.add(project) var root = new RootNamespace(self) @@ -91,7 +94,7 @@ abstract class Entity var doc = new JsonArray is writable init do - self.labels.add(graph.project["name"].to_s) + self.labels.add(graph.project_name) self.labels.add("MEntity") end -- 1.7.9.5