class Postmark::Mitt::Attachment
Attributes
source[RW]
Public Class Methods
new(attachment_source)
click to toggle source
# File lib/postmark/mitt.rb, line 111 def initialize(attachment_source) @source = attachment_source end
Public Instance Methods
content_type()
click to toggle source
# File lib/postmark/mitt.rb, line 116 def content_type source["ContentType"] end
file_name()
click to toggle source
# File lib/postmark/mitt.rb, line 120 def file_name source["Name"] end
read()
click to toggle source
# File lib/postmark/mitt.rb, line 124 def read tempfile = MittTempfile.new(file_name, content_type) tempfile.write(Base64.decode64(source["Content"])) tempfile end
size()
click to toggle source
# File lib/postmark/mitt.rb, line 130 def size source["ContentLength"] end