@chrpr And so you can take the records out and wrap it in a function that's only called when it's needed, i.e.:

    def records
       @records ||= Nokogiri::XML(File.open(self.filename)).xpath('//oai_dc:dc', 'oai_dc' => 'http://www.openarchives.org/OAI/2.0/oai_dc/')
    end

And then reference this everywhere you reference `@records`.