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-6.0.0 lib/fhir_client/sections/feed.rb
fhir_client-5.0.3 lib/fhir_client/sections/feed.rb
fhir_client-5.0.2 lib/fhir_client/sections/feed.rb
fhir_client-5.0.1 lib/fhir_client/sections/feed.rb
fhir_client-5.0.0 lib/fhir_client/sections/feed.rb
fhir_client-4.0.6 lib/fhir_client/sections/feed.rb
fhir_client-4.0.5 lib/fhir_client/sections/feed.rb
fhir_client-4.0.4 lib/fhir_client/sections/feed.rb
fhir_client-4.0.3 lib/fhir_client/sections/feed.rb
fhir_client-4.0.2 lib/fhir_client/sections/feed.rb
fhir_client-4.0.1 lib/fhir_client/sections/feed.rb
fhir_client-4.0.0 lib/fhir_client/sections/feed.rb
fhir_client-3.1.2 lib/fhir_client/sections/feed.rb
fhir_client-3.1.1 lib/fhir_client/sections/feed.rb
fhir_client-3.1.0 lib/fhir_client/sections/feed.rb
fhir_client-3.0.3 lib/fhir_client/sections/feed.rb
fhir_client-3.0.2 lib/fhir_client/sections/feed.rb
fhir_client-3.0.1 lib/fhir_client/sections/feed.rb
fhir_client-1.8.0 lib/fhir_client/sections/feed.rb
fhir_client-1.6.10 lib/fhir_client/sections/feed.rb