[BioRuby-cvs] bioruby/lib/bio reference.rb,1.20,1.21

Mitsuteru C. Nakao nakao at pub.open-bio.org
Wed Feb 8 15:06:28 UTC 2006


Update of /home/repository/bioruby/bioruby/lib/bio
In directory pub.open-bio.org:/tmp/cvs-serv12435/lib/bio

Modified Files:
	reference.rb 
Log Message:
* lib/bio/reference.rb: fixed a bug in the endnote method.
* test/unit/bio/test_reference.rb: newly added.


Index: reference.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/reference.rb,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** reference.rb	8 Feb 2006 14:38:59 -0000	1.20
--- reference.rb	8 Feb 2006 15:06:26 -0000	1.21
***************
*** 43,50 ****
    # === Examples
    # 
!   #    hash = {'authors' => [ "Hoge, J.P.", "Fuga, F.B." ], 'title' => "Title of the study.",
!   #            'journal' => "Theor. J. Hoge", 'volume' => 12, 'issue' => 3, 'pages' => "123-145",
!   #            'year' => 2001, 'pubmed' => 12345678, 'medline' => 98765432, 'abstract' => "...",
!   #            ''url' => "http://...", 'mesh' => [], 'affiliations' => []}
    #    ref = Bio::Reference.new(hash)
    #
--- 43,59 ----
    # === Examples
    # 
!   #    hash = {'authors' => [ "Hoge, J.P.", "Fuga, F.B." ], 
!   #            'title' => "Title of the study.",
!   #            'journal' => "Theor. J. Hoge", 
!   #            'volume' => 12, 
!   #            'issue' => 3, 
!   #            'pages' => "123-145",
!   #            'year' => 2001, 
!   #            'pubmed' => 12345678, 
!   #            'medline' => 98765432, 
!   #            'abstract' => "Hoge fuga. ...",
!   #            'url' => "http://example.com", 
!   #            'mesh' => [], 
!   #            'affiliations' => []}
    #    ref = Bio::Reference.new(hash)
    #
***************
*** 171,181 ****
          lines << "%A #{author}"
        end
!       lines << "%D #{@year}" unless @year.empty?
        lines << "%T #{@title}" unless @title.empty?
        lines << "%J #{@journal}" unless @journal.empty?
!       lines << "%V #{@volume}" unless @volume.empty?
!       lines << "%N #{@issue}" unless @issue.empty?
        lines << "%P #{@pages}" unless @pages.empty?
!       lines << "%M #{@pubmed}" unless @pubmed.empty?
        if @pubmed
          cgi = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi"
--- 180,190 ----
          lines << "%A #{author}"
        end
!       lines << "%D #{@year}" unless @year.to_s.empty?
        lines << "%T #{@title}" unless @title.empty?
        lines << "%J #{@journal}" unless @journal.empty?
!       lines << "%V #{@volume}" unless @volume.to_s.empty?
!       lines << "%N #{@issue}" unless @issue.to_s.empty?
        lines << "%P #{@pages}" unless @pages.empty?
!       lines << "%M #{@pubmed}" unless @pubmed.to_s.empty?
        if @pubmed
          cgi = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi"




More information about the bioruby-cvs mailing list