From: Vicente Bosch Campos Date: 2011-03-23T17:32:45+09:00 Subject: Dynamically calling a certain set of methods Hi, I am doing an implementation of a genetic algorithm to resolve a certain type of equations. I need to randomly call a certain method from a set: def mutation self.send(self.methods.select!{|element| element.to_s.end_with?("Mutation")}.shuffle![0]) #I'm using to_s as the symbol object do not allow end_with? end def operatorSwitchMutation end def numberSwitchMutation end def unusedNumberMutation end Is self.send(self.methods.select!{|element| element.to_s.end_with?("Mutation")}.shuffle![0]) the best way to do it ? Is there a more ruby idiom to perform the safe thing ? Best, V.