Class: Vagrant::Command::Base
- Inherits:
-
Object
- Object
- Vagrant::Command::Base
- Includes:
- Util::SafePuts
- Defined in:
- lib/vagrant/command/base.rb
Overview
Base class for any CLI commands.
This class provides documentation on the interface as well as helper functions that a command has.
Direct Known Subclasses
Vagrant::CLI, Box, BoxAdd, BoxList, BoxRemove, BoxRepackage, Destroy, Gem, Halt, Init, Package, Provision, Reload, Resume, SSH, SSHConfig, Status, Suspend, Up
Instance Method Summary collapse
-
#execute ⇒ Object
This is what is called on the class to actually execute it.
-
#initialize(argv, env) ⇒ Base
constructor
A new instance of Base.
Methods included from Util::SafePuts
Constructor Details
#initialize(argv, env) ⇒ Base
Returns a new instance of Base.
14 15 16 17 18 |
# File 'lib/vagrant/command/base.rb', line 14 def initialize(argv, env) @argv = argv @env = env @logger = Log4r::Logger.new("vagrant::command::#{self.class.to_s.downcase}") end |
Instance Method Details
#execute ⇒ Object
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.
23 |
# File 'lib/vagrant/command/base.rb', line 23 def execute; end |