Class: Postnhost::Translation::ContentTranslator
- Inherits:
-
BaseService
- Object
- BaseService
- Postnhost::Translation::ContentTranslator
- Defined in:
- app/services/postnhost/translation/content_translator.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(source:, language:, llm_client:) ⇒ ContentTranslator
constructor
A new instance of ContentTranslator.
Methods inherited from BaseService
Constructor Details
#initialize(source:, language:, llm_client:) ⇒ ContentTranslator
Returns a new instance of ContentTranslator.
4 5 6 7 8 |
# File 'app/services/postnhost/translation/content_translator.rb', line 4 def initialize(source:, language:, llm_client:) @source = source @language = language @llm_client = llm_client end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/services/postnhost/translation/content_translator.rb', line 10 def call { title: translate_title, title_tag: translate_title_tag, og_title: translate_og_title, meta_description: , content: translate_body } end |