From 05a3fd233ec1ac4475bd797449d1284f6824c005 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 Mar 2011 20:41:28 -0500 Subject: v3: ruby 1.9 hash symbol syntax adopted --- lib/sisu/v3/author_format.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v3/author_format.rb') diff --git a/lib/sisu/v3/author_format.rb b/lib/sisu/v3/author_format.rb index 5406913f..847ea888 100644 --- a/lib/sisu/v3/author_format.rb +++ b/lib/sisu/v3/author_format.rb @@ -67,17 +67,17 @@ module FORMAT authors.each do |a| a.strip! if a =~/"(.+?)"/ - @authors << { :the => $1 } + @authors << { the: $1 } @author_array << $1.upcase else #if a =~/,/ x=a.scan(/[^,]+/) x[0].strip! x[1].strip! if x[1] if x.length==1 - @authors << { :the => x[0] } + @authors << { the: x[0] } @author_array << x[0].upcase elsif x.length==2 - @authors << { :the=> x[0], :others => x[1] } + @authors << { the: x[0], others: x[1] } @author_array << "#{x[0].upcase}, #{x[1]}" else #p x.length end @@ -101,11 +101,11 @@ module FORMAT end end { - :last_first_a => authors, - :last_first_format_a => @author_array, - :authors_h => @authors, - :authors_s => authors_string, - :authors_param => @author_param + last_first_a: authors, + last_first_format_a: @author_array, + authors_h: @authors, + authors_s: authors_string, + authors_param: @author_param } end end -- cgit v1.2.3