Sha256: 414aaa9db966047d2297ec79085999770028f829b8cba84b5b838b29fe4a2ed4

Contents?: true

Size: 542 Bytes

Versions: 23

Compression:

Stored size: 542 Bytes

Contents

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.method(page).call
        return nil unless link
        reply = get strip_base(link.url), fhir_headers
        reply.resource = parse_reply(current.resource_class, @default_format, reply)
        reply.resource_class = current.resource_class
        reply
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fhir_client-1.6.9 lib/fhir_client/sections/feed.rb
fhir_client-1.6.8 lib/fhir_client/sections/feed.rb
fhir_client-1.6.7 lib/fhir_client/sections/feed.rb