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.



15
16
17
18
19
# File 'lib/vagrant/plugin/v1/command.rb', line 15

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.



24
25
# File 'lib/vagrant/plugin/v1/command.rb', line 24

def execute
end