Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Tree
- @branches = 0
- @height = 0
- @availableOptions: => ['branches', 'height']
- class Dog
- @age = 0
- @name = 'Doge'
- @availableOptions: => ['age', 'name']
- arr = ['Tree', 'Dog']
- #alert(Tree.availableOptions())
- for elem in arr
- do ->
- options = eval("#{elem}.availableOptions()")
- for option in options
- do ->
- val = eval("#{elem}.#{option}")
- alert(val)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement