Module: I18nContextGenerator::Config::Serialization
- Included in:
- I18nContextGenerator::Config
- Defined in:
- lib/i18n_context_generator/config/serialization.rb
Overview
Secret-free, versioned representation used by --print-config and clients.
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/i18n_context_generator/config/serialization.rb', line 7 def to_h { 'schema_version' => @schema_version, 'translations' => serialized_translations, 'source' => { 'paths' => @source_paths, 'ignore' => @ignore_patterns }, 'context' => { 'files' => @context_files }, 'llm' => { 'provider' => @provider, 'model' => @model, 'endpoint' => @endpoint }.compact, 'processing' => { 'discovery_mode' => @discovery_mode, 'platform' => @platform, 'concurrency' => @concurrency, 'context_lines' => @context_lines, 'max_matches_per_key' => @max_matches_per_key, 'max_prompt_chars' => @max_prompt_chars }.compact, 'cache' => { 'enabled' => !@no_cache, 'directory' => @cache_dir }, 'output' => { 'format' => @output_format, 'path' => (@output_path unless @output_stdout), 'stdout' => @output_stdout, 'write_back' => @write_back, 'write_back_to_code' => @write_back_to_code, 'context_prefix' => @context_prefix, 'context_mode' => @context_mode }.compact, 'swift' => { 'functions' => @swift_functions }, 'privacy' => { 'include_file_paths' => @include_file_paths, 'include_translation_comments' => @include_translation_comments, 'redact_prompts' => @redact_prompts }, 'workflow' => { 'stage' => @workflow_stage } } end |