Class: Vagrant::Plugin::V2::Command
- Inherits:
-
Object
- Object
- Vagrant::Plugin::V2::Command
- Includes:
- Util::SafePuts
- Defined in:
- lib/vagrant/plugin/v2/command.rb
Overview
This is the base class for a CLI command.
Instance Method Summary collapse
-
#execute ⇒ Object
This is what is called on the class to actually execute it.
-
#initialize(argv, env) ⇒ Command
constructor
A new instance of Command.
Methods included from Util::SafePuts
Constructor Details
#initialize(argv, env) ⇒ Command
Returns a new instance of Command.
12 13 14 15 16 |
# File 'lib/vagrant/plugin/v2/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
#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.
21 22 |
# File 'lib/vagrant/plugin/v2/command.rb', line 21 def execute end |