summaryrefslogtreecommitdiff
path: root/class_example.lua
diff options
context:
space:
mode:
Diffstat (limited to 'class_example.lua')
-rw-r--r--class_example.lua24
1 files changed, 0 insertions, 24 deletions
diff --git a/class_example.lua b/class_example.lua
deleted file mode 100644
index ab69b70..0000000
--- a/class_example.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-A = nerv.class()
-function A:_init(x)
- self.x = x
-end
-function A:f()
- return self.x
-end
-
-function A:g()
- return self.x + 1
-end
-
-B = nerv.class(A)
-
-function B:f()
- return self.x * self.x
-end
-
-a = A(3)
-b = B(3)
-print(a:f())
-print(b:f())
-print(b:g())
-