summaryrefslogtreecommitdiff
path: root/tests/example_module.py
blob: fbf0b45ed45e2884e0a4dfc5bdbc9ee3ccc4d319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Copyright (C) by Josh Blum. See LICENSE.txt for licensing information.

import gras

class MyBlock(gras.Block):
    def __init__(self):
        gras.Block.__init__(self, "MyBlock")
        self.foo = 0
        self.register_call("get_num", self.get_num)

    def work(self, *args): pass

    def get_num(self):
        return 42

gras.register_make("/tests/my_block1", MyBlock)