From 02eec4498027352e87826929d015f5b47bad93f8 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 22 Jul 2023 16:38:33 +0100 Subject: metaclass instances --- bos-meta.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bos-meta.sh (limited to 'bos-meta.sh') diff --git a/bos-meta.sh b/bos-meta.sh new file mode 100644 index 0000000..6932095 --- /dev/null +++ b/bos-meta.sh @@ -0,0 +1,17 @@ +#!bash + +declare -A bos_meta_metaclass_instance_for_class + +function bos-meta/set-metaclass-instance-for() { + bos_meta_metaclass_instance_for_class["$1"]="$2" + + return 0 +} + +function bos-meta/metaclass-instance-for-class-into() { + local -n bos_meta_metaclass_instance_result="$1" + + bos_meta_metaclass_instance_result="${bos_meta_metaclass_instance_for_class[$2]}" + + return 0 +} -- cgit v1.2.3