summaryrefslogtreecommitdiff
path: root/lib/command_processor.rb
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-02-16 23:09:19 -0700
committermo k <mo@mokhan.ca>2012-02-16 23:09:19 -0700
commitfaa9af85891ceee8ea87e01b5b4412d6aa6cbc55 (patch)
treed5f23302f3c022657d5b0dcf900cadf4568eca39 /lib/command_processor.rb
parent23c3c07dcf93c07cfc536cfd5d26933ae2d4b7a8 (diff)
create command processor.
Diffstat (limited to 'lib/command_processor.rb')
-rw-r--r--lib/command_processor.rb11
1 files changed, 11 insertions, 0 deletions
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