diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-03-01 20:41:28 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-03-01 20:41:28 -0500 |
commit | 05a3fd233ec1ac4475bd797449d1284f6824c005 (patch) | |
tree | fdd93c057196640ec4907f58f66cf5bc00dfbdf6 /lib/sisu/v3/author_format.rb | |
parent | v3: use rb1.9.2 "require_relative" syntax (diff) |
v3: ruby 1.9 hash symbol syntax adopted
Diffstat (limited to 'lib/sisu/v3/author_format.rb')
-rw-r--r-- | lib/sisu/v3/author_format.rb | 16 |
1 files changed, 8 insertions, 8 deletions
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 |