Class: Vagrant::List::VMInfo
- Inherits:
-
Object
- Object
- Vagrant::List::VMInfo
- Includes:
- Util
- Defined in:
- lib/vagrant-list/vm_info.rb
Instance Attribute Summary collapse
-
#guest_os ⇒ Object
Returns the value of attribute guest_os.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(uuid) ⇒ VMInfo
constructor
A new instance of VMInfo.
-
#inspect ⇒ Object
Public - Override inspect to display vm attributes.
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_os ⇒ Object
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 |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/vagrant-list/vm_info.rb', line 10 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
8 9 10 |
# File 'lib/vagrant-list/vm_info.rb', line 8 def raw @raw end |
#uuid ⇒ Object
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
#inspect ⇒ Object
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 |