Module Vpim::Attachment
In: lib/vpim/attachment.rb

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:

  • Uri#to_io, Inline#to_io: return an IO from which the value can be read.
  • Uri#to_s, Inline#to_s: return the value as a String.
  • Uri#format, 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.

Classes and Modules

Class Vpim::Attachment::Inline
Class Vpim::Attachment::Uri

[Validate]