# encoding: utf-8 class MailBuilder def to(receivers) @to = receivers return self end def from(sender) @from = "#{sender.hxt_id}@hexacta.com" return self end def subject(a_subject) @subject = a_subject return self end def description(a_description) @description = a_description return self end def link(a_link) @link = a_link return self end def send @from ||= "apps@hexacta.com" GeneralMail.new({ :to => @to, :from => @from, :subject => @subject, :description => @description, :link => @link }).send end end