lib/bio/db/medline.rb in bio-0.7.1 vs lib/bio/db/medline.rb in bio-1.0.0
- old
+ new
@@ -1,10 +1,29 @@
#
-# bio/db/medline.rb - NCBI PubMed/MEDLINE database class
+# = bio/db/medline.rb - NCBI PubMed/MEDLINE database class
#
-# Copyright (C) 2001, 2005 KATAYAMA Toshiaki <k@bioruby.org>
+# Copyright:: Copyright (C) 2001, 2005
+# KATAYAMA Toshiaki <k@bioruby.org>
+# License:: LGPL
#
+# == Description
+#
+# NCBI PubMed/MEDLINE database class.
+#
+# == Examples
+#
+# medline = Bio::MEDLINE.new(txt)
+# medline.reference
+# medline.pmid == medline.entry_id
+# medilne.mesh
+#
+# == References
+#
+# $Id: medline.rb,v 1.13 2006/02/18 15:03:47 nakao Exp $
+#
+#++
+#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
@@ -15,19 +34,21 @@
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# $Id: medline.rb,v 1.12 2005/09/08 01:22:11 k Exp $
+#--
#
require 'bio/db'
module Bio
+ # NCBI PubMed/MEDLINE database class.
class MEDLINE < NCBIDB
+ #
def initialize(entry)
@pubmed = Hash.new('')
tag = ''
entry.each_line do |line|
@@ -37,10 +58,10 @@
@pubmed[tag] += line[6..-1] if line.length > 6
end
end
- # Reference object
+ # returns a Reference object.
def reference
hash = Hash.new('')
hash['authors'] = authors
hash['title'] = title