class Bio::LITDB
LITDB
class¶ ↑
Constants
- DELIMITER
-
Delimiter
- RS
-
Delimiter
- TAGSIZE
Public Class Methods
Source
# File lib/bio/db/litdb.rb 27 def initialize(entry) 28 super(entry, TAGSIZE) 29 end
Calls superclass method
Bio::NCBIDB::new
Public Instance Methods
Source
# File lib/bio/db/litdb.rb 66 def journal 67 field_fetch('JOURNAL') 68 end
JOURNAL
Source
# File lib/bio/db/litdb.rb 76 def keyword 77 unless @data['KEYWORD'] 78 @data['KEYWORD'] = fetch('KEYWORD').split(/;;\s*/) 79 end 80 @data['KEYWORD'] 81 end
KEYWORD ‘;;’
Source
# File lib/bio/db/litdb.rb 32 def reference 33 hash = Hash.new('') 34 35 hash['authors'] = author.split(/;/).map {|x| x.sub(/,/, ', ')} 36 hash['title'] = title 37 hash['journal'] = journal.gsub(/\./, '. ').strip 38 39 vol = volume.split(/,\s+/) 40 if vol.size > 1 41 hash['volume'] = vol.shift.sub(/Vol\./, '') 42 hash['pages'], 43 hash['year'] = vol.pop.split(' ') 44 hash['issue'] = vol.shift.sub(/No\./, '') unless vol.empty? 45 end 46 47 return Reference.new(hash) 48 end
Returns