Sha256: 0ed5f3cc1191c2a75ff0d4a9d315db8156fcfa910444c440dabbc8abe1d39871
Contents?: true
Size: 682 Bytes
Versions: 10
Compression:
Stored size: 682 Bytes
Contents
module Postmark module SharedMessageExtensions def tag self['TAG'] end def tag=(value) self['TAG'] = value end def postmark_attachments=(value) @_attachments = value.is_a?(Array) ? value : [value] end def postmark_attachments return if @_attachments.nil? @_attachments.collect do |item| if item.is_a?(Hash) item elsif item.is_a?(File) { "Name" => item.path.split("/")[-1], "Content" => [ IO.read(item.path) ].pack("m"), "ContentType" => "application/octet-stream" } end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems