Sha256: 53c5034bc51807b8df89b1383f6df940b1498042daba680e38111804c4401ac7
Contents?: true
Size: 735 Bytes
Versions: 7
Compression:
Stored size: 735 Bytes
Contents
module BioInterchange class Writer # Creates a new instance of a writer that will use the provided output stream to serialize object model instances. # # +ostream+:: instance of IO or derivative class def initialize(ostream) raise BioInterchange::Exceptions::ImplementationWriterError, 'The output stream is not an instance of IO or its subclasses.' unless ostream.kind_of?(IO) @ostream = ostream end # Serializes an object model instance. # # +model+:: an object model instance def serialize(model) raise BioInterchange::Exceptions::ImplementationWriterError, 'You must implement this method, which takes an object model and serializes it into the previously provided output stream.' end end end
Version data entries
7 entries across 7 versions & 1 rubygems