[BioRuby-cvs] bioruby/lib/bio reference.rb,1.25,1.26

Pjotr Prins pjotr at dev.open-bio.org
Sat May 31 09:36:58 UTC 2008


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

Modified Files:
	reference.rb 
Log Message:
- Bibtex: reverted on url regression per comment Naohisa - now it gets overridden on empty for pubmed only.
- Bibtex: fixed unit tests



Index: reference.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/reference.rb,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** reference.rb	29 May 2008 11:25:44 -0000	1.25
--- reference.rb	31 May 2008 09:36:55 -0000	1.26
***************
*** 77,80 ****
--- 77,83 ----
      attr_reader :affiliations
  
+     # An URL String.
+     attr_reader :url
+ 
      # Create a new Bio::Reference object from a Hash of values. 
      # Data is extracted from the values for keys:
***************
*** 125,128 ****
--- 128,132 ----
        @medline  = hash['medline'] # 98765432
        @abstract = hash['abstract']
+       @url      = hash['url']
        @mesh     = hash['mesh']
        @affiliations = hash['affiliations']
***************
*** 503,506 ****
--- 507,511 ----
      # *Returns*:: String
      def url
+       return @url if @url and @url != ''
        if @pubmed != ''
          cgi = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi"




More information about the bioruby-cvs mailing list