Class: DuplicateKeyFinder
- Inherits:
-
LocaleFileWalker
- Object
- LocaleFileWalker
- DuplicateKeyFinder
- Defined in:
- lib/i18n/duplicate_key_finder.rb
Instance Method Summary collapse
Instance Method Details
#find_duplicates(path) ⇒ Object
4 5 6 7 8 |
# File 'lib/i18n/duplicate_key_finder.rb', line 4 def find_duplicates(path) @keys_with_count = Hash.new { 0 } handle_document(Psych.parse_file(path)) @keys_with_count.select { |key, count| count > 1 }.keys end |