Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Object maker
- class_Chair() {
- self=$1
- attributes="$@"
- read -ra ${1} <<< "$attributes"
- export ${1}
- }
- # Methods
- chairAttr() {
- var="$1[@]"
- echo ${!var}
- }
- # Create object class_Chair objectName model color type
- class_Chair novaNevara nv-123 red outdoor
- output=$(chairAttr novaNevara)
- echo $output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement