summaryrefslogtreecommitdiff
path: root/test.sh
blob: f16164739768236c9208f47a0d047b09715080d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash 
 
PS4='[${#FUNCNAME[*]}] ${BASH_SOURCE[0]}:${LINENO} (${FUNCNAME[0]}) +'
 
. bos-namespaces.sh
. bos-object-id.sh
. bos-mop.sh
. bos-dispatch.sh
. bos-mop-inheritance.sh
. bos-sugar.sh
 
class A; do
 
    function thing() {
        echo "<$self> A/thing ($*)"
    }
 
done
 
class B; do
    extends A
 
    function other() {
        echo "<$self> B/other ($*)"
    }
 
done
 
A new-into objA
B new-into objB
 
$objA thing 1 2 3
$objB thing 4 5 6
$objB other 7 8 9