Module: I18nContextGenerator::Config::CliValues
- Included in:
- I18nContextGenerator::Config
- Defined in:
- lib/i18n_context_generator/config/cli_values.rb
Overview
Normalizes repeatable singular CLI values while retaining explicit legacy comma-list support.
Instance Method Summary collapse
Instance Method Details
#cli_key_filters(values, legacy: nil) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/i18n_context_generator/config/cli_values.rb', line 16 def cli_key_filters(values, legacy: nil) repeatable = Array(values).filter_map do |value| normalized = value.to_s.strip normalized unless normalized.empty? end repeatable + split_legacy_list(legacy) end |
#cli_path_list(values, legacy: nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/i18n_context_generator/config/cli_values.rb', line 8 def cli_path_list(values, legacy: nil) repeatable = Array(values).filter_map do |value| normalized = value.to_s.strip normalized unless normalized.empty? end (repeatable + split_legacy_list(legacy)).uniq end |