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

Version Path
biointerchange-1.0.8 lib/biointerchange/reader.rb
biointerchange-1.0.7 lib/biointerchange/reader.rb
biointerchange-1.0.6 lib/biointerchange/reader.rb
biointerchange-1.0.5 lib/biointerchange/reader.rb
biointerchange-1.0.4 lib/biointerchange/reader.rb
biointerchange-1.0.2 lib/biointerchange/reader.rb
biointerchange-1.0.1 lib/biointerchange/reader.rb
biointerchange-1.0.0 lib/biointerchange/reader.rb
biointerchange-0.2.2 lib/biointerchange/reader.rb
biointerchange-0.2.1 lib/biointerchange/reader.rb
biointerchange-0.2.0 lib/biointerchange/reader.rb
biointerchange-0.1.3 lib/biointerchange/reader.rb
biointerchange-0.1.2 lib/biointerchange/reader.rb
biointerchange-0.1.0 lib/biointerchange/reader.rb