<commit_before>module FHIR
  module Sections
    module Feed

      FORWARD = :next_link
      BACKWARD = :next_link
      FIRST = :first_link
      LAST = :last_link

      def next_page(current, page=FORWARD)
        bundle = current.resource
        link = bundle.next_link #bundle.method(page).call
        return nil unless link
        reply = get strip_base(link.url), fhir_headers
        reply.resource = parse_reply(current.resource_class, FHIR::Formats::FeedFormat::FEED_XML, reply.body)
        reply.resource_class = current.resource_class
        reply
      end


    end
  end
end<commit_msg>Fix feed backward/previous link.<commit_after>module FHIR
  module Sections
    module Feed

      FORWARD = :next_link
      BACKWARD = :previous_link
      FIRST = :first_link
      LAST = :last_link

      def next_page(current, page=FORWARD)
        bundle = current.resource
        link = bundle.next_link #bundle.method(page).call
        return nil unless link
        reply = get strip_base(link.url), fhir_headers
        reply.resource = parse_reply(current.resource_class, FHIR::Formats::FeedFormat::FEED_XML, reply.body)
        reply.resource_class = current.resource_class
        reply
      end


    end
  end
end
{'fraction_non_alphanumeric': 0.07586763518966909, 'fraction_numerical': 0.0, 'mean_word_length': 2.6470588235294117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5680975', 'n_tokens_mistral': 386, 'n_tokens_neox': 355, 'n_words': 84}