Class: Vagrant::Plugin::Remote::Push

Inherits:
V2::Push
  • Object
show all
Defined in:
lib/vagrant/plugin/remote/push.rb

Overview

This class enables Push for server mode

Instance Attribute Summary collapse

Attributes inherited from V2::Push

#config, #env

Instance Method Summary collapse

Constructor Details

#initialize(env, config, **opts) ⇒ Push

Returns a new instance of Push.



13
14
15
16
17
18
19
20
# File 'lib/vagrant/plugin/remote/push.rb', line 13

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

Instance Attribute Details

#clientObject

Add an attribute accesor for the client when applied to the Push class



11
12
13
# File 'lib/vagrant/plugin/remote/push.rb', line 11

def client
  @client
end

Instance Method Details

#pushObject



22
23
24
# File 'lib/vagrant/plugin/remote/push.rb', line 22

def push
  client.push
end