Class: Vagrant::VMInfo
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.
10 11 12 13 14 |
# File 'lib/vagrant/vm_info.rb', line 10 def initialize(uuid) driver = Driver::VirtualBox.new self.raw = driver.execute("showvminfo", uuid) process! end |
Instance Attribute Details
#guest_os ⇒ Object
Returns the value of attribute guest_os.
8 9 10 |
# File 'lib/vagrant/vm_info.rb', line 8 def guest_os @guest_os end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/vagrant/vm_info.rb', line 7 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
5 6 7 |
# File 'lib/vagrant/vm_info.rb', line 5 def raw @raw end |
#uuid ⇒ Object
Returns the value of attribute uuid.
6 7 8 |
# File 'lib/vagrant/vm_info.rb', line 6 def uuid @uuid end |
Instance Method Details
#inspect ⇒ Object
Public - Override inspect to display vm attributes
19 20 21 |
# File 'lib/vagrant/vm_info.rb', line 19 def inspect "#{uuid}: #{name} (#{guest_os})" end |