BashOOP/example/Object.shc

13 lines
194 B
Bash

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