Module: Vagrant::Vagrantfile::Remote

Defined in:
lib/vagrant/vagrantfile/remote.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(klass) ⇒ Object

Add an attribute reader for the client when applied to the Machine class



11
12
13
14
15
# File 'lib/vagrant/vagrantfile/remote.rb', line 11

def self.prepended(klass)
  klass.class_eval do
    attr_reader :client
  end
end

Instance Method Details

#initialize(*_, client:) ⇒ Object



17
18
19
20
# File 'lib/vagrant/vagrantfile/remote.rb', line 17

def initialize(*_, client:)
  @client = client
  @config = ConfigWrapper.new(client: client)
end

#machine(name, provider, _, _, _) ⇒ Machine

Returns:



23
24
25
# File 'lib/vagrant/vagrantfile/remote.rb', line 23

def machine(name, provider, _, _, _)
  client.machine(name, provider)
end

#machine_config(name, provider, _, _, validate_provider = true) ⇒ Object



31
32
33
# File 'lib/vagrant/vagrantfile/remote.rb', line 31

def machine_config(name, provider, _, _,  validate_provider=true)
  client.machine_config(name, provider, validate_provider)
end

#machine_namesObject



27
28
29
# File 'lib/vagrant/vagrantfile/remote.rb', line 27

def machine_names
  client.target_names
end