diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-03-08 20:18:52 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-03-08 20:52:39 -0500 |
commit | 5d7e44a5b73caf2a835bef9c15020134cae34453 (patch) | |
tree | 3176a6a09c2b1eb26208fbf7183628194dc2b9c3 /lib/sisu/v4/options.rb | |
parent | v4: bin/sisu, process remote sisu markup file or sisupod, where url provided (diff) |
v4: hub, operations, report on absent markup file, if needed by requested action
Diffstat (limited to 'lib/sisu/v4/options.rb')
-rw-r--r-- | lib/sisu/v4/options.rb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 724fd9a9..0608df4e 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -1029,36 +1029,38 @@ module SiSU_Commandline @lng_base end def fno - @fno=fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] + @fno=(fns.nil? || fns.empty?) \ + ? '' \ + : (fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1]) end def fng - @fng=fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1') + @fng=(fno.nil? || fno.empty?) \ + ? '' \ + : (fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1')) end def fns @fns end def fnl - x=@fns.gsub(/(\S+?)((?:\.ssm)?\.sst)/,"\\1.#{lng}\\2") + @fns.gsub(/(\S+?)((?:\.ssm)?\.sst)/,"\\1.#{lng}\\2") end def what @what end def fnb - unless fns.empty? - fns[/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/,1] - end + (fns.nil? || fns.empty?) \ + ? '' \ + : (fns[/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/,1]) end def fnc - @fnc=if @fns =~/\.(?:ssm\.sst|ssm)$/ - fnb + '.ssm.sst' - else @fns - end + @fnc=(@fns =~/\.(?:ssm\.sst|ssm)$/) \ + ? fnb + '.ssm.sst' + : @fns end def fncb - @fncb=if @fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/ - fnb + '.ssm.sst' - else @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') - end + @fncb=(@fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/) \ + ? fnb + '.ssm.sst' + : @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') end end end |