From faa9af85891ceee8ea87e01b5b4412d6aa6cbc55 Mon Sep 17 00:00:00 2001 From: mo k Date: Thu, 16 Feb 2012 23:09:19 -0700 Subject: create command processor. --- lib/command_processor.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/command_processor.rb (limited to 'lib/command_processor.rb') diff --git a/lib/command_processor.rb b/lib/command_processor.rb new file mode 100644 index 0000000..7e9de08 --- /dev/null +++ b/lib/command_processor.rb @@ -0,0 +1,11 @@ +class CommandProcessor + def initialize + @commands = [] + end + def add(command) + @commands << command + end + def run + @commands.each { |e| e.run } + end +end -- cgit v1.2.3