Ruby - "meta method" execute
//
// attempt to execute a method indirectly, I don't know if
// it's possible, but I suspect it is, and probably just
// have the syntax wrong
//
1 2 ar = %w(apples bananas oranges) 3 4 print "\n ar.class = #{ar.class}" 5 6 print "\n ar.methods = #{ar.methods.sort}" 7 puts "=======================================================" 8 9 mets = ar.methods.sort 10 11 # 12 # this doesn't work ... is there a syntax for doing this? 13 # i.e. calling a 'meta' method ? 14 # 15 # call each method of 'ar' (an array) 16 # 17 # 18 19 mets.each {|method| ar.method} 20