diff options
Diffstat (limited to 'actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb')
-rw-r--r-- | actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb b/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb new file mode 100644 index 0000000000..19eb624c1c --- /dev/null +++ b/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Mail + class Address + def self.wrap(address) + address.is_a?(Mail::Address) ? address : Mail::Address.new(address) + end + end +end |