From 64dfdccbc0a136aab15c53ef0375244a28895429 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 19 Mar 2015 18:38:21 -0400 Subject: d: ao & elsewhere, use of map & select --- lib/sisu/develop/hub_options.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/sisu/develop/hub_options.rb') diff --git a/lib/sisu/develop/hub_options.rb b/lib/sisu/develop/hub_options.rb index 6e22c2ae..f6a40be9 100644 --- a/lib/sisu/develop/hub_options.rb +++ b/lib/sisu/develop/hub_options.rb @@ -249,17 +249,15 @@ module SiSU_Commandline end end def init_selected_lang_dirs(a) - @z=[] - a.each do |y| + @z=a.each.map do |y| if y =~/^#{lng_base}\/(\S+?\.ss[tm])$/ @fn=$1 - @z << y + y elsif y =~/^#{@lang_regx}\/?$/ - @z << "#{y}/#{@fn}" - else @z << y + "#{y}/#{@fn}" + else y end end - @z end def init a=@a -- cgit v1.2.3