Ouch. Approximately how many commands are available? I was thinking instead of allowing a variable to be passed, each of the functions can be defined and they just are each a thin wrapper calling execute_command. Alternatively, there could be a class constant that defines the list of commands, and then there's a method that is responsible for creating the default methods based on the values of the class constant (probably a tuple).