class BioInterchange::Reader

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.

Public Class Methods

new() click to toggle source

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.

# File lib/biointerchange/reader.rb, line 13
def initialize
end

Public Instance Methods

deserialize(istream) click to toggle source

Reads data from the provided input stream and returns an input specific object model instance.

istream

input IO stream to deserialize

# File lib/biointerchange/reader.rb, line 19
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