Module: BibliographicalImporter::AbstractReader

Includes:
Enumerable
Included in:
BibTex::Reader, CSV::Reader, JSON::Reader, JSONApiCrossref::Reader, PmcEfetchXml::Reader, PubmedSummary::Reader, Ris::Reader
Defined in:
lib/bibliographical_importer.rb

Overview

The Reader shouldn’t be instantiated directly, but using AbstractReader.parse or AbstractReader.open Reader include Enumerable, so each traverse along the records

Class Method Summary collapse

Class Method Details

.open(filename) ⇒ Object

Parse a file

Parameters:

  • filename (String)

    or [IO]



46
47
48
# File 'lib/bibliographical_importer.rb', line 46

def self.open(filename)
  raise "Should read a filename"
end

.parse(string, bib_db = nil) ⇒ Object

Parse a string

Parameters:

  • string (String)

    to parse

  • bib_db (String) (defaults to: nil)

    Bibliographic database name. Could affect the processing of text. See BibliographicDatabase



53
54
55
# File 'lib/bibliographical_importer.rb', line 53

def self.parse(string, bib_db=nil)
  raise "Should write a file"
end