module SoarConfiguredFactory class ConfiguredFactory attr_accessor :configuration attr_reader :path def initialize(configuration) @configuration = configuration end def create(type) entry = @configuration @path = { } if not @path @path.each do |node| entry = entry[node] end Object::const_get(entry[type]['adaptor']).new(entry[type]) end end end