https://github.com/mikel/mail
Ruby
A Really Ruby Mail Library
Mail::Message#default
Returns the default value of the field requested as a symbol. Each header field has a :default method which returns the most common use case for that field, for example, the date field types will return a DateTime object when sent :default, the subject, or unstructured fields will return a decoded string of their value, the address field types will return a single addr_spec or an array of addr_specs if there is more than one.
Edit
git clone [email protected]:mikel/mail.git
cd mail
open lib/mail/message.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Mail--Message-default-for-pr
# Commit to gitgit add lib/mail/message.rbgit commit -m "better docs for Mail::Message#default"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Mail--Message-default-for-pr
hub pull-request
# Celebrate!