lib/logcabin/collection.rb in logcabin-0.0.1 vs lib/logcabin/collection.rb in logcabin-0.0.3

- old
+ new

@@ -16,10 +16,12 @@ return @modules[name] if @modules[name] file = find_file(name) require file class_name = parse_class_name(name) @modules[name] = LogCabin::Modules.const_get(class_name) + rescue LoadError + raise("Error while loading #{name}") end private ## @@ -35,9 +37,9 @@ def find_file(name) @load_path.each do |dir| file_path = File.join(dir, "#{name}.rb") return file_path if File.exist? file_path end - fail("Module #{method} not found") + fail("Module #{name} not found") end end end