Class: FlowmailerRails::MailConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/flowmailer_rails/mail_converter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rails_mail) ⇒ MailConverter

Returns a new instance of MailConverter.



7
8
9
# File 'lib/flowmailer_rails/mail_converter.rb', line 7

def initialize(rails_mail)
  @rails_mail = rails_mail
end

Instance Attribute Details

#rails_mailObject (readonly)

Returns the value of attribute rails_mail.



5
6
7
# File 'lib/flowmailer_rails/mail_converter.rb', line 5

def rails_mail
  @rails_mail
end

Instance Method Details

#recipients_as_jsonObject



11
12
13
14
15
# File 'lib/flowmailer_rails/mail_converter.rb', line 11

def recipients_as_json
  recipient_addresses.map do |recipient|
    JSON.dump(as_json.merge(recipientAddress: recipient))
  end
end