# File lib/fog/bin/virtual_box.rb, line 26 def available? availability = if Gem::Specification.respond_to?(:find_all_by_name) !Gem::Specification.find_all_by_name('virtualbox').empty? # newest rubygems else !Gem.source_index.find_name('virtualbox').empty? # legacy end if availability for service in services for collection in self.class_for(service).collections unless self.respond_to?(collection) self.class_eval "def self.\#{collection}\nself[:\#{service}].\#{collection}\nend\n", __FILE__, __LINE__ end end end end availability end