lib/fhir_client/ext/reference.rb in fhir_client-3.1.2 vs lib/fhir_client/ext/reference.rb in fhir_client-4.0.0

- old
+ new

@@ -37,11 +37,11 @@ else parts[:id] end end - def type + def resource_type return if contained? parts[:type] end def version_id @@ -80,21 +80,33 @@ module FHIR class Reference include FHIR::ReferenceExtras def resource_class - "FHIR::#{type}".constantize unless contained? + "FHIR::#{resource_type}".constantize unless contained? end end end module FHIR module DSTU2 class Reference include FHIR::ReferenceExtras def resource_class - "FHIR::DSTU2::#{type}".constantize unless contained? + "FHIR::DSTU2::#{resource_type}".constantize unless contained? + end + end + end +end + +module FHIR + module STU3 + class Reference + include FHIR::ReferenceExtras + + def resource_class + "FHIR::STU3::#{resource_type}".constantize unless contained? end end end end