summaryrefslogtreecommitdiff
path: root/bos-dispatch.sh
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2023-07-14 15:22:38 +0100
committerGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2023-07-14 15:22:38 +0100
commit6297ec2ae4263c346a9f7cf036055ca8cdb72c78 (patch)
tree77263057ecc8c925315cd6cd10939a0cf0942413 /bos-dispatch.sh
parentmuch better encoding (diff)
downloadbash-object-system-6297ec2ae4263c346a9f7cf036055ca8cdb72c78.tar.gz
bash-object-system-6297ec2ae4263c346a9f7cf036055ca8cdb72c78.tar.bz2
bash-object-system-6297ec2ae4263c346a9f7cf036055ca8cdb72c78.zip
inheritance via MOP
*probably*, I'm still not completely certain I've found all the weirdness
Diffstat (limited to 'bos-dispatch.sh')
-rw-r--r--bos-dispatch.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bos-dispatch.sh b/bos-dispatch.sh
index cb883d8..afefb5e 100644
--- a/bos-dispatch.sh
+++ b/bos-dispatch.sh
@@ -6,10 +6,9 @@ function bos-dispatch/invoke() {
local self_id="$1";shift
local method="$1";shift
- local self
- bos-object-id/pack-self-into "$class" "$self_id" self
-
if declare -F "$class/$method" >/dev/null; then
+ local self
+ bos-object-id/pack-self-into "$class" "$self_id" self
"$class/$method" "$@"
return $?
fi
@@ -19,4 +18,5 @@ function bos-dispatch/invoke() {
local -n metaclass_object="$metaclass_ref"
$metaclass_object invoke "$class" "$self_id" "$method" "$@"
+ return $?
}