[gobject-introspection/gir-docbook] [docbook] Entity -> method
- From: Laszlo Pandy <lpandy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/gir-docbook] [docbook] Entity -> method
- Date: Thu, 11 Aug 2011 10:41:46 +0000 (UTC)
commit ffa858941c1e2d25f57292b6a3ba084d6e54922d
Author: Laszlo Pandy <lpandy src gnome org>
Date: Thu Aug 11 11:57:10 2011 +0200
[docbook] Entity -> method
giscanner/docbookwriter.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py
index 7a1bbff..107ab9d 100644
--- a/giscanner/docbookwriter.py
+++ b/giscanner/docbookwriter.py
@@ -122,15 +122,15 @@ class DocBookFormatter(object):
class DocBookPage(object):
def __init__(self, name, description=""):
- self.entities = []
+ self.methods = []
self.name = name
self.description = description
- def add_entity(self, entity):
- self.entities.append(entity)
+ def add_method(self, entity):
+ self.methods.append(entity)
- def get_entities(self):
- return self.entities
+ def get_methods(self):
+ return self.methods
class DocBookEntity(object):
@@ -177,7 +177,7 @@ class DocBookWriter(object):
if isinstance(node, (ast.Class, ast.Record, ast.Interface)):
for method in node.methods:
method.parent_class = node
- page.add_entity(DocBookEntity(method.name, "method", method))
+ page.add_method(DocBookEntity(method.name, "method", method))
def write(self, output):
with self._writer.tagcontext("book", [
@@ -211,7 +211,7 @@ class DocBookWriter(object):
self._writer.write_tag(
"title", [("role", "synopsis.title")], "Synopsis")
with self._writer.tagcontext('synopsis'):
- for entity in page.get_entities():
+ for entity in page.get_methods():
self._formatter.render_method(entity, link=True)
# if page.description:
@@ -247,10 +247,10 @@ class DocBookWriter(object):
("role", "details")]):
self._writer.write_tag("title", [("role", "details.title")],
"Details")
- for entity in page.get_entities():
- self._render_entity(entity)
+ for entity in page.get_methods():
+ self._render_method(entity)
- def _render_entity(self, entity):
+ def _render_method(self, entity):
self._writer.push_tag('refsect2',
[('id', "%s-function" % entity.get_name()),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]