aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mop/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mop/__init__.py b/mop/__init__.py
index 554cc9c..c07b12e 100644
--- a/mop/__init__.py
+++ b/mop/__init__.py
@@ -227,6 +227,12 @@ def bootstrap():
name="get_body", body=gen_reader("body")
))
+ def get_value(self, instance):
+ return instance.slots[self.get_name()]
+ Attribute.add_method(Method.new(
+ name="get_value", body=get_value
+ ))
+
Class.add_attribute(Attribute.new(name="name"))
Class.add_attribute(Attribute.new(name="superclass"))
Class.add_attribute(Attribute.new(name="attributes", default=lambda: {}))