I was wondering if it is possible to save some ruby statements inside an Array like:
a = 1
b = 0
statements = ['a += 1','b = a + 4']
statements.each { |s| s.execute }
The reason for why I want to do this is to be able to use Array permutation to execute every combination of of a subset of the statements in the array.
Perhaps I am making it to difficult for myself and there is an easier (and perhaps more obvious) way.
Thankful for any help.