Add remote host plugin
This commit is contained in:
parent
f88254eb23
commit
7e9dad2b3e
23
lib/vagrant/plugin/remote/host.rb
Normal file
23
lib/vagrant/plugin/remote/host.rb
Normal file
@ -0,0 +1,23 @@
|
||||
module Vagrant
|
||||
module Plugin
|
||||
module Remote
|
||||
class Host < V2::Host
|
||||
attr_accessor :client
|
||||
|
||||
def initialize(*_, **kwargs)
|
||||
@client = kwargs.delete(:client)
|
||||
if @client.nil?
|
||||
raise ArgumentError,
|
||||
"Remote client is required for `#{self.class.name}`"
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
# @return [Boolean]
|
||||
def detect?(env)
|
||||
client.detect(env)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user