From: martinahansen Date: Wed, 4 May 2011 14:10:50 +0000 (+0000) Subject: fixed default cast for lists in biopieces.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b3201d61e1d45277dbbd0329d0444bad21192592;p=biopieces.git fixed default cast for lists in biopieces.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1370 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/Maasha/lib/biopieces.rb b/code_ruby/Maasha/lib/biopieces.rb index e8486c3..8ee2423 100644 --- a/code_ruby/Maasha/lib/biopieces.rb +++ b/code_ruby/Maasha/lib/biopieces.rb @@ -374,7 +374,13 @@ class OptionHandler def options_default @casts.each do |cast| if cast[:default] - @options[cast[:long]] = cast[:default] unless @options.has_key? cast[:long] + unless @options.has_key? cast[:long] + if cast[:type] == 'list' + @options[cast[:long]] = cast[:default].split ',' + else + @options[cast[:long]] = cast[:default] + end + end end end end