13 lines
196 B
Bash
13 lines
196 B
Bash
|
# Property declaration
|
||
|
property Object.name
|
||
|
|
||
|
# Optional constructor.
|
||
|
Object.constructor() {
|
||
|
Object.name = $1
|
||
|
}
|
||
|
|
||
|
# Example function
|
||
|
Object.print() {
|
||
|
echo "Example OOP from $(this.name)!"
|
||
|
}
|