Class: Vagrant::Plugin::Remote::Guest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*_, **kwargs) ⇒ Guest

Returns a new instance of Guest.



10
11
12
13
14
15
16
17
# File 'lib/vagrant/plugin/remote/guest.rb', line 10

def initialize(*_, **kwargs)
  @client = kwargs.delete(:client)
  if @client.nil?
    raise ArgumentError,
      "Remote client is required for `#{self.class.name}`"
  end
  super
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



8
9
10
# File 'lib/vagrant/plugin/remote/guest.rb', line 8

def client
  @client
end

Instance Method Details

#detect?(machine) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
23
# File 'lib/vagrant/plugin/remote/guest.rb', line 20

def detect?(machine)
  client = machine.client.guest
  client.detect(machine)
end