# File lib_core/rucy/document.rb, line 311
    def load
      @doc_map = Hash.new
      @filter_map = Hash.new
      @factory = @rep.fetch(:DocumentFactory)
      rucy_consts = Hash[*Rucy.constants.map{|n| [n, true] }.flatten]
      @mod_path.scan do |rb_path|
        loader = @rep.fetch(:ModuleLoader)
        begin
          loader.load(rb_path)
          for const_name in loader.constants
            next if (rucy_consts.include? const_name)
            case (const_name)
            when /Document$/
              @doc_map[const_name] = loader
              doc_builder = const_name + 'Builder'
              if (loader.const_defined? doc_builder) then
                @factory.add_document(loader.const_get(doc_builder).instance)
              else
                @factory.add_document(loader.const_get(const_name))
              end
            when /Filter$/
              @filter_map[const_name] = loader
              filter_builder = const_name + 'Builder'
              if (loader.const_defined? filter_builder) then
                @factory.add_filter(loader.const_get(filter_builder).instance)
              else
                @factory.add_filter(loader.const_get(const_name))
              end
            end
          end
        rescue StandardError, ScriptError
          @load_errors.push([ rb_path, $! ])
          if (block_given?) then
            yield(rb_path, $!)
          end
        end
      end

      nil
    end