def scan(retrieved)
      errorlen = errors.size
      old_callback = @logger.callback
      options = ::RightSupport::Data::Mash.new(@options).merge(retrieved)
      repo = options[:repository]
      unless repo.kind_of?(::RightScraper::Repositories::Base)
        repo = ::RightSupport::Data::Mash.new(repo)
        repository_hash = repo.delete(:repository_hash)  # optional
        repo = RightScraper::Repositories::Base.from_hash(repo)
        if repository_hash && repository_hash != repo.repository_hash
          raise RightScraper::Error, "Repository hash mismatch: #{repository_hash} != #{repo.repository_hash}"
        end
        options[:repository] = repo
      end
      @logger.operation(:scraping, options[:repo_dir]) do
        scraper = ::RightScraper::Scrapers::Base.scraper(options)
        @resources += scraper.scrape
      end
      errors.size == errorlen
    end
def scan(retrieved)
      errorlen = errors.size
      old_callback = @logger.callback
      options = ::RightSupport::Data::Mash.new(@options).merge(retrieved)
      repo = options[:repository]
      unless repo.kind_of?(::RightScraper::Repositories::Base)
        repo = ::RightSupport::Data::Mash.new(repo)
        repository_hash = repo.delete(:repository_hash)  # optional
        repo = RightScraper::Repositories::Base.from_hash(repo)
        if repository_hash && repository_hash != repo.repository_hash
          raise RightScraper::Error, "Repository hash mismatch: #{repository_hash} != #{repo.repository_hash}"
        end
        options[:repository] = repo
      end
      @logger.operation(:scraping, options[:repo_dir]) do
        scraper = ::RightScraper::Scrapers::Base.scraper(options)
        @resources += scraper.scrape
      end
      errors.size == errorlen
    end
Scans a local directory. See #scrape for details.