class Vcard::Vcard

A vCard, a specialization of a directory info object.

The vCard format is specified by:

This implements vCard 3.0, but it is also capable of working with vCard 2.1 if used with care.

All line values can be accessed with Vcard#value, Vcard#values, or even by iterating through Vcard#lines. Line types that don’t have specific support and non-standard line types (“X-MY-SPECIAL”, for example) will be returned as a String, with any base64 or quoted-printable encoding removed.

Specific support exists to return more useful values for the standard vCard types, where appropriate.

The wrapper functions (birthday, nicknames, emails, etc.) exist partially as an API convenience, and partially as a place to document the values returned for the more complex types, like PHOTO and EMAIL.

For types that do not sensibly occur multiple times (like BDAY or GEO), sometimes a wrapper exists only to return a single line, using value. However, if you find the need, you can still call values to get all the lines, and both the singular and plural forms will eventually be implemented.

For more information see:

vCards are usually transmitted in files with .vcf extensions.

Examples