From cfa267b43ab49cb6cb72a7e6675a49d4fbc6576a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 15 May 2011 14:30:20 -0400 Subject: v3: sysenv, options, output_dir_structure.by? (language|filetype|filename) --- lib/sisu/v3/options.rb | 3 ++- lib/sisu/v3/sysenv.rb | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 110ebd85..30f857f6 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -61,12 +61,13 @@ module SiSU_commandline require "pathname" require_relative 'sysenv' # sysenv.rb class Options - attr_accessor :cmd,:mod,:act,:f_pths,:files,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what + attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what def initialize(a) @a=a @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng='','','','','','','','','','' @f_pths,@files,@paths,@mod,@act=Array.new(5){[]} @env=SiSU_Env::Info_env.new + @dir_structure_by=SiSU_Env::Env_call.new.output_dir_structure.by? r=Px[:lng_lst].join('|') #r.gsub!(/\|en\|/,'|') @lang_regx=%r{(?:#{r})} diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index c22f878c..6d010c76 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -440,6 +440,15 @@ module SiSU_Env def multilingual? by_language_code? end + def by? + by=if by_language_code? + 'language' + elsif by_filetype? + 'filetype' + else + 'filename' + end + end self end def document_language_versions_found #REVISIT -- cgit v1.2.3