1 2 3 4 5 6 7 8 9 10 11
class CommandProcessor def initialize @commands = [] end def add(command) @commands << command end def run @commands.each { |e| e.run } end end