mail icon indicating copy to clipboard operation
mail copied to clipboard

Add #merge! support to AttachmentsList

Open caioertai opened this issue 7 years ago • 2 comments

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?

caioertai avatar Dec 11 '18 17:12 caioertai

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.

caioertai avatar Dec 12 '18 03:12 caioertai

It's been a while since I've looked at this. Is there anything I can do here, @jeremy? Thank you.

caioertai avatar Jul 25 '22 19:07 caioertai