Sha256: 68ea0bff103bfe7686c3a882618fbdbbb51a6f2f66751a86e985c3b78723477f

Contents?: true

Size: 306 Bytes

Versions: 1

Compression:

Stored size: 306 Bytes

Contents

module CountingHelper
  # Counts how much keys there is in key array
  def countKeys(array)
    array.flatten.count - array.count
  end

  # Gets translation percentage
  def translationPercentage(all_keys, missing_translations)
    ((1 - ( missing_translations.to_f / all_keys )) * 100).round(2)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kakimasu-1.0.0 app/helpers/counting_helper.rb