module Vpim::Attachment
Attachments are used by both iCalendar and vCard. They are either a URI or inline data, and their decoded value will be either a Uri or a Inline, as appropriate.
Besides the methods specific to their class, both kinds of object implement a set of common methods, allowing them to be treated uniformly:
-
Vpim::Attachment::Uri#to_io, Vpim::Attachment::Inline#to_io: return an IO from which the value can be read.
-
Vpim::Attachment::Uri#to_s, Inline#to_s: return the value as a String.
-
Vpim::Attachment::Uri#format, Vpim::Attachment::Inline#format: the format of the value. This is supposed to be an “iana defined” identifier (like “image/jpeg”), but could be almost anything (or nothing) in practice. Since the parameter is optional, it may be “”.
The objects can also be distinguished by their class, if necessary.