Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (20 sloc) 0.397 kb
require 'command'
class CompositeCommand < Command
def initialize
@commands = []
end
def add_command(command)
@commands << command
end
def execute
@commands.each{|cmd| cmd.execute }
end
def unexecute
@commands.reverse.each{ |cmd| cmd.unexecute }
end
def description
description = ''
@commands.each{ |cmd| description += cmd.description + "\n" }
description
end
end
Jump to Line
Something went wrong with that request. Please try again.