Class: Vagrant::Plugin::V1::Command

Inherits:
Object
  • Object
show all
Includes:
Util::SafePuts
Defined in:
lib/vagrant/plugin/v1/command.rb

Overview

This is the base class for a CLI command.

Instance Method Summary collapse

Methods included from Util::SafePuts

#safe_puts

Constructor Details

#initialize(argv, env) ⇒ Command

Returns a new instance of Command.



12
13
14
15
16
# File 'lib/vagrant/plugin/v1/command.rb', line 12

def initialize(argv, env)
  @argv = argv
  @env  = env
  @logger = Log4r::Logger.new("vagrant::command::#{self.class.to_s.downcase}")
end

Instance Method Details

#executeObject

This is what is called on the class to actually execute it. Any subclasses should implement this method and do any option parsing and validation here.



21
22
# File 'lib/vagrant/plugin/v1/command.rb', line 21

def execute
end