Sha256: 44eca31bb9020738d330d30d7ee6341e65bd61ffa7b369baf22638efd40e12b8
Contents?: true
Size: 972 Bytes
Versions: 14
Compression:
Stored size: 972 Bytes
Contents
module BioInterchange # A reader takes information from an input stream and creates an object model. # # For example, the input stream might hold text-mining data in some format. This # data is deserialized by the reader and turned into an object model representation, # i.e. an instance of a Ruby class that describes the data. class Reader # Create a new instance of a reader. Ideally you want to provide your own initialization # method in derived classes that takes some extra parameters for configuring/parametrizing the # data deserialization with +deserialize+. def initialize end # Reads data from the provided input stream and returns an input specific object model instance. # # +istream+:: input IO stream to deserialize def deserialize(istream) raise BioInterchange::Exceptions::ImplementationReaderError, 'You must implement this method, which reads data from an input stream and returns an object model instance.' end end end
Version data entries
14 entries across 14 versions & 1 rubygems