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])