mail
mail copied to clipboard
Add #merge! support to AttachmentsList
Not sure if this is a generally desired feature, but it seems natural to me that this should be possible since it shares Hash behaviors:
attachments = {
'test.pdf' => read_raw_fixture('attachments', 'test.pdf'),
'test.gif' => read_raw_fixture('attachments', 'test.gif'),
'test.jpg' => read_raw_fixture('attachments', 'test.jpg')
}
mail.attachments.merge!(attachments)
The fact that there's a #merge! without an otherwise expected #merge irks me a bit. But it seems a simple improvement to the class.
Thoughts?
Fixed it. And sorry for not testing on Ruby 1.8.7. Openssl acts up with Ubuntu 18.04. Ran it through a container this time.
It's been a while since I've looked at this. Is there anything I can do here, @jeremy? Thank you.