Some basic cleanup of 'if' logic

This commit is contained in:
Mitchell Hashimoto 2010-09-02 13:02:09 -07:00
parent 2d80c32479
commit 33e2b93139
1 changed files with 3 additions and 7 deletions

View File

@ -38,13 +38,9 @@ module Vagrant
# configuration path is properly set.
def check_virtualbox!
version = VirtualBox.version
if version.nil?
raise Errors::VirtualBoxNotDetected.new
elsif version.to_f < 3.2
raise Errors::VirtualBoxInvalidVersion.new(:version => version.to_s)
elsif version.to_s.downcase.include?("ose")
raise Errors::VirtualBoxInvalidOSE.new(:version => version.to_s)
end
raise Errors::VirtualBoxNotDetected.new if version.nil?
raise Errors::VirtualBoxInvalidVersion.new(:version => version.to_s) if version.to_f < 3.2
raise Errors::VirtualBoxInvalidOSE.new(:version => version.to_s) if version.to_s.downcase.include?("ose")
end
end