diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-03-08 20:22:47 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-03-08 20:52:39 -0500 |
commit | 7c083c2adb09f2519fcc177753515930d9070486 (patch) | |
tree | a24e4fb1eddc307c01532ba3976e5099be3d679d /lib | |
parent | v4: hub, operations, report on absent markup file, if needed by requested action (diff) |
v4: sysenv, cosmetic, minor
Diffstat (limited to 'lib')
-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) |