devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

Mail::AddressList#initialize

Mail::AddressList is the class that parses To, From and other address fields from
emails passed into Mail.

AddressList provides a way to query the groups and mailbox lists of the passed in
string.

It can supply all addresses in an array, or return each address as an address object.

Mail::AddressList requires a correctly formatted group or mailbox list per RFC2822 or
RFC822.  It also handles all obsolete versions in those RFCs.

 list = '[email protected], My Group: [email protected], Bob <[email protected]>;'
 a = AddressList.new(list)
 a.addresses    #=> [#<Mail::Address:14943130 Address: |[email protected]...
 a.group_names  #=> ["My Group"]

Source | Google | Stack overflow

Edit

git clone [email protected]:plataformatec/devise.git

cd devise

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Mail--AddressList-initialize-for-pr


# Commit to git

git add git commit -m "better docs for Mail::AddressList#initialize"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Mail--AddressList-initialize-for-pr

hub pull-request


# Celebrate!