From f1d71f9481c3ecce38b133f66b73af514794c8d6 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Thu, 9 Jan 2014 00:26:51 -0300 Subject: [PATCH] core: Reintroduce `name` attribute for the `Guest` Maintain compatibility for vagrant-vbguest plugin which uses it. vagrant-vbguest doesn't use the caps system (to keep compatibility with older Vagrant versions), but includes similar functionality itself. --- lib/vagrant/guest.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vagrant/guest.rb b/lib/vagrant/guest.rb index 85a6eb8da..f7be29ba1 100644 --- a/lib/vagrant/guest.rb +++ b/lib/vagrant/guest.rb @@ -45,5 +45,12 @@ module Vagrant def ready? !!capability_host_chain end + + # Returns the specified or detected guest type name + # + # @return [Symbol] + def name + capability_host_chain[0][0] + end end end