Sha256: 0aebdb3c32b2d784ef93db2785d964f88f769a0e3d6fde1a8902a019dc4c1786
Contents?: true
Size: 452 Bytes
Versions: 11
Compression:
Stored size: 452 Bytes
Contents
module LifenFhir class Attachment < Base attribute :title, String attribute :path, String attribute :content_type, String def fhir_payload { contentAttachment: { data: base_64_encoded_content, title: title, contentType: "{#{content_type}}" } } end private def base_64_encoded_content Base64.encode64(File.open(path, "rb").read) end end end
Version data entries
11 entries across 11 versions & 1 rubygems