Class: Vagrant::List::VMInfo

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/vagrant-list/vm_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uuid) ⇒ VMInfo

Returns a new instance of VMInfo.



13
14
15
16
# File 'lib/vagrant-list/vm_info.rb', line 13

def initialize(uuid)
  self.raw = `VBoxManage showvminfo #{uuid}`
  process!
end

Instance Attribute Details

#guest_osObject

Returns the value of attribute guest_os.



11
12
13
# File 'lib/vagrant-list/vm_info.rb', line 11

def guest_os
  @guest_os
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/vagrant-list/vm_info.rb', line 10

def name
  @name
end

#rawObject

Returns the value of attribute raw.



8
9
10
# File 'lib/vagrant-list/vm_info.rb', line 8

def raw
  @raw
end

#uuidObject

Returns the value of attribute uuid.



9
10
11
# File 'lib/vagrant-list/vm_info.rb', line 9

def uuid
  @uuid
end

Instance Method Details

#inspectObject

Public - Override inspect to display vm attributes



21
22
23
# File 'lib/vagrant-list/vm_info.rb', line 21

def inspect
  "#{uuid}: #{name} (#{guest_os})"
end