Allow creating multiple easy commands

This commit is contained in:
Mitchell Hashimoto 2012-05-06 09:54:23 -07:00
parent 63ed57e880
commit dc4f6e1939
1 changed files with 3 additions and 4 deletions

View File

@ -5,9 +5,6 @@ module Vagrant
# Base class for all easy commands. This contains the basic code
# that knows how to run the easy commands.
class CommandBase < Vagrant::Command::Base
@command = nil
@runner = nil
# This is called by the {EasyCommand.create} method when creating
# an easy command to set the invocation command.
def self.configure(name, &block)
@ -18,6 +15,8 @@ module Vagrant
def initialize(*args, &block)
super
@command = self.class.instance_variable_get(:@command)
@runner = self.class.instance_variable_get(:@runner)
@logger = Log4r::Logger.new("vagrant::easy_command::#{@command}")
end