2022-04-25 12:26:35 -05:00

26 lines
592 B
Ruby

module Vagrant
module Plugin
module Remote
# This class enables Push for server mode
class Push < V2::Push
# Add an attribute accesor for the client
# when applied to the Push class
attr_accessor :client
def initialize(env, config, **opts)
if opts[:client].nil?
raise ArgumentError,
"Remote client is required for `#{self.class.name}`"
end
@client = opts[:client]
super(env, config)
end
def push
client.push
end
end
end
end
end