diff options
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r-- | lib/sisu/v4/sysenv.rb | 16 |
1 files 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) |