Sha256: 9563a047cbce3a676f13437cc5e723cd50b3992c76dbbc2cea86e18f36de9f25
Contents?: true
Size: 740 Bytes
Versions: 94
Compression:
Stored size: 740 Bytes
Contents
module Translator class TranslatorCoordinator attr_reader :paths def initialize(paths:, frequency:) @paths = paths @frequency = frequency end def requests @requests ||= @paths.map do |path| Translator::FileTranslator.new(path).translation_requests end.flatten end def requests_by_frequency @requests_by_frequency ||= requests.group_by(&:frequency) end def create_smartling_jobs! Translator::SmartlingCoordinator.call( requests: requests_by_frequency.fetch(@frequency, []), frequency: @frequency ) end def download_smartling_files! Translator::SmartlingDownloader.call( paths: @paths ) end end end
Version data entries
94 entries across 94 versions & 1 rubygems