From 66bfe1d2c4403895ff4d2e34fba654731f723c92 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Tue, 28 Dec 2021 00:57:55 +0100 Subject: [PATCH] Minor changes and fixes --- README.md | 10 +++++++++- oop.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d9161b..32d3fb5 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,15 @@ This is the main script which will use our objects. importNamespace Example.shn -Example.Object t "Test" +Example.Object t1 "Test" +Example.Object t2 "Example" + +t1.print +t2.print + +t1.name = "New name" + +t1.print ``` `Example.shn`: diff --git a/oop.sh b/oop.sh index 47f14a4..d467d89 100644 --- a/oop.sh +++ b/oop.sh @@ -4,7 +4,7 @@ # Internal variables are marked with a beginning underscore, like in most other languages. # Signatures are a list of arguments.. Those within <> are mandatory, the ones within [] are optional. _namespace="" -_namespacePath="" +_namespacePath=$(realpath $(dirname ${BASH_SOURCE[0]})) # Namespace declaration. # Signature: ([string namespaceName])