diff options
author | dakkar <dakkar@thenautilus.net> | 2023-07-22 12:35:39 +0100 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2023-07-22 12:35:39 +0100 |
commit | 6b3f9cb909df162345d9f5a001abeb0d3df31ce9 (patch) | |
tree | 32d89ba43faaea0ebfe69f9aaa8f002c7b9e57bd /bos-object-id.sh | |
parent | move tests to actual test programs (diff) | |
download | bash-object-system-6b3f9cb909df162345d9f5a001abeb0d3df31ce9.tar.gz bash-object-system-6b3f9cb909df162345d9f5a001abeb0d3df31ce9.tar.bz2 bash-object-system-6b3f9cb909df162345d9f5a001abeb0d3df31ce9.zip |
`*-into` always takes the destination as `$1`
Diffstat (limited to 'bos-object-id.sh')
-rw-r--r-- | bos-object-id.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bos-object-id.sh b/bos-object-id.sh index ac7a7c8..47dfd6d 100644 --- a/bos-object-id.sh +++ b/bos-object-id.sh @@ -7,17 +7,17 @@ # id, so that `$my_obj the-method 1 2` is equivalent to `bos_invoke # TheClass $the_obj_id the-method 1 2` function bos-object-id/pack-self-into() { - local bos_object_id_class="$1" - local bos_object_id_self_id="$2" - local -n bos_object_id_result="$3" + local -n bos_object_id_result="$1" + local bos_object_id_class="$2" + local bos_object_id_self_id="$3" bos_object_id_result="bos-dispatch/invoke $bos_object_id_class $bos_object_id_self_id" } # get class and object id from a $self string function bos-object/unpack-self-into() { - local bos_object_id_self="$1" - local -n bos_object_id_class="$2" - local -n bos_object_id_self_id="$3" + local -n bos_object_id_class="$1" + local -n bos_object_id_self_id="$2" + local bos_object_id_self="$3" local _ read -r _ bos_object_id_class bos_object_id_self_id <<<"$bos_object_id_self" } |