Class: Vagrant::Plugin::Remote::Command
- Inherits:
-
V2::Command
- Object
- V2::Command
- Vagrant::Plugin::Remote::Command
- Defined in:
- lib/vagrant/plugin/remote/command.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Add an attribute accesor for the client when applied to the Command class.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv, env, **kwargs) ⇒ Command
constructor
A new instance of Command.
Methods inherited from V2::Command
Methods included from Util::SafePuts
Constructor Details
#initialize(argv, env, **kwargs) ⇒ Command
Returns a new instance of Command.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/vagrant/plugin/remote/command.rb', line 12 def initialize(argv, env, **kwargs) @logger = Log4r::Logger.new("vagrant::remote::command") @logger.debug("initializing command with remote backend") @argv = argv @env = env @client = kwargs.delete(:client) if @client.nil? raise ArgumentError, "Remote client is required for `#{self.class.name}`" end end |
Instance Attribute Details
#client ⇒ Object
Add an attribute accesor for the client when applied to the Command class
10 11 12 |
# File 'lib/vagrant/plugin/remote/command.rb', line 10 def client @client end |
Instance Method Details
#execute ⇒ Object
24 25 26 |
# File 'lib/vagrant/plugin/remote/command.rb', line 24 def execute client.execute(@argv) end |