Raven Manual - Classes and Objects

Build classes:

class Super
	# instance variable
	'undefined greeting' as $greeting
	# method
	define say_hello
		$greeting "%s\n" format print

# inherits from Super
class Alpha extend Super
	'Hello world, I am an Alpha!' as $greeting

Execute classes to build objects:

Super as $super
Alpha as $alpha

Call object methods:

$super . say_hello
$alpha . say_hello

Result:

undefined greeting
Hello world, I am an Alpha!

Multiple inheritance:

class Alpha
   define method_1
      "method_1\n" print

class Beta
   define method_2
      "method_2\n" print

class Gamma extend Alpha extend Beta
   define test
      method_1 method_1

Gamma . test

Result:

method_1
method_2

eof