[BioRuby-cvs] bioruby/lib/bio/sequence format.rb,1.4,1.4.2.1
Naohisa Goto
ngoto at dev.open-bio.org
Thu Feb 14 03:13:48 UTC 2008
Update of /home/repository/bioruby/bioruby/lib/bio/sequence
In directory dev.open-bio.org:/tmp/cvs-serv19681/lib/bio/sequence
Modified Files:
Tag: BRANCH-biohackathon2008
format.rb
Log Message:
* lib/bio/sequence.rb
* changed to include Format module
* lib/bio/sequence/format.rb
* fixed bug: incorrect refactoring
Index: format.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/sequence/format.rb,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** format.rb 5 Apr 2007 23:35:41 -0000 1.4
--- format.rb 14 Feb 2008 03:13:46 -0000 1.4.2.1
***************
*** 18,23 ****
module Bio
- autoload :Sequence, 'bio/sequence'
-
class Sequence
--- 18,21 ----
***************
*** 127,131 ****
def format_qualifiers(qualifiers, indent, width)
! qualifiers.each do |qualifier|
q = qualifier.qualifier
v = qualifier.value.to_s
--- 125,129 ----
def format_qualifiers(qualifiers, indent, width)
! qualifiers.collect do |qualifier|
q = qualifier.qualifier
v = qualifier.value.to_s
***************
*** 134,138 ****
lines = wrap('/' + q, width)
elsif q == 'translation'
! lines = fold('/' + q + '=' + val, width)
else
if v[/\D/]
--- 132,136 ----
lines = wrap('/' + q, width)
elsif q == 'translation'
! lines = fold('/' + q + '=' + v, width)
else
if v[/\D/]
***************
*** 141,149 ****
v = '"' + v + '"'
end
! lines = wrap('/' + q + '=' + val, width)
end
! return lines.gsub(/^/, indent)
! end
end
--- 139,148 ----
v = '"' + v + '"'
end
! lines = wrap('/' + q + '=' + v, width)
end
! lines.gsub!(/^/, indent)
! lines
! end.join
end
More information about the bioruby-cvs
mailing list