class MonkeyMailer::Email
Attributes
attachments[RW]
body[RW]
from_email[RW]
from_name[RW]
priority[RW]
subject[RW]
to_email[RW]
to_name[RW]
Public Class Methods
new(hash=nil)
click to toggle source
# File lib/monkey-mailer/email.rb, line 6 def initialize(hash=nil) self.attachments = [] unless hash.nil? new_attachments = [hash.delete(:attachments)].flatten.compact new_attachments.each do |attachment_hash| self.attachments << Attachment.new(attachment_hash) end hash.each_pair{|key, value| self.send("#{key}=", value)} end end