From 7c083c2adb09f2519fcc177753515930d9070486 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Mar 2013 20:22:47 -0500 Subject: v4: sysenv, cosmetic, minor --- lib/sisu/v4/sysenv.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 581eb0d5..5647efd7 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1838,21 +1838,17 @@ WOK self end def read_source_file_array(fns) - fns_array=unless fns =~/\.ssm.sst$/ - IO.readlines(fns, mode: 'r:utf-8', cr_newline: true) - else - IO.readlines("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true) - end + fns_array=(fns !~/\.ssm.sst$/) \ + ? (IO.readlines(fns, mode: 'r:utf-8', cr_newline: true)) + : (IO.readlines("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true)) end def read_source_file(fns) read_source_file_array(fns) end def read_source_file_string(fns) - fns_str=unless fns =~/\.ssm.sst$/ - IO.read(fns, mode: 'r:utf-8', cr_newline: true) - else - IO.read("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true) - end + fns_str=(fns !~/\.ssm.sst$/) \ + ? (IO.read(fns, mode: 'r:utf-8', cr_newline: true)) + : (IO.read("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true)) end def source_file_processing_array(fns) sf=read_source_file_string(fns).split(/\s*\n\s*\n/m) -- cgit v1.2.3