Sha256: 769f0b8d7836c414b7b81649f4274fc29436412fd1aab304e3b7480a373196eb

Contents?: true

Size: 367 Bytes

Versions: 3

Compression:

Stored size: 367 Bytes

Contents

# frozen_string_literal: true

module Localer
  class Data
    # A service that returns array of missing translations
    class MissingTranslations < Service
      param :data

      def call
        missing = []
        data.each do |locale, key, value|
          missing.push("#{locale}#{key}") if value.nil?
        end
        missing
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
localer-0.2.0 lib/localer/data/missing_translations.rb
localer-0.1.1 lib/localer/data/missing_translations.rb
localer-0.1.0 lib/localer/data/missing_translations.rb