module

Chem::FormatReader::Attached(T)

Declares a common interface for reading the attached object encoded in a file format. This is useful for cases when a file format also encodes an additional object but it is not part of the main content (e.g., some volumetric data file formats used in computational chemistry also include information of the molecule structure).

Including types must implement the #decode_attached : T protected method, where the type variable T indicates the attached object type. Upon parsing issues, including types are expected to raise a ParseException exception.

Instance methods

read_attached

Reads the attached object from the IO. Raises IO::Error if the reader is closed or ParseException if the object cannot be decoded.

Source