diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-05-15 14:30:20 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-05-15 14:30:22 -0400 |
commit | cfa267b43ab49cb6cb72a7e6675a49d4fbc6576a (patch) | |
tree | b2810facb42215690bb4f14627f6dbd9bd3f5a5c /lib | |
parent | v3: sysenv, output directory structure check, fix (start testing alternatives) (diff) |
v3: sysenv, options, output_dir_structure.by? (language|filetype|filename)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v3/options.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 9 |
2 files changed, 11 insertions, 1 deletions
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 |