# File lib/deltacloud/drivers.rb, line 67 def driver require driver_source_name @driver ||= driver_class.new end
# File lib/deltacloud/drivers.rb, line 53 def driver_class basename = driver_config[:"#{driver_symbol}"][:class] || "#{driver_name}Driver" Deltacloud::Drivers.const_get(driver_name).const_get(basename) end
# File lib/deltacloud/drivers.rb, line 34 def driver_config if Thread::current[:drivers].nil? Thread::current[:drivers] = {} top_srcdir = File.join(File.dirname(__FILE__), '..', '..') Dir[File.join(top_srcdir, 'config', 'drivers', '*.yaml')].each do |driver_file| Thread::current[:drivers].merge!(YAML::load(File::read(driver_file))) end end Thread::current[:drivers] end
# File lib/deltacloud/drivers.rb, line 62 def driver_mock_source_name return File.join('deltacloud', 'drivers', "#{driver_symbol}", "#{driver_symbol}_driver.rb") if driver_name.eql? 'Mock' end
# File lib/deltacloud/drivers.rb, line 49 def driver_name driver_config[:"#{driver_symbol}"][:name] end
Generated with the Darkfish Rdoc Generator 2.