Class: I18n::Coverage::KeyLister
- Inherits:
-
Object
- Object
- I18n::Coverage::KeyLister
- Defined in:
- lib/i18n/coverage/key_lister.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(locale, locale_dir_path) ⇒ KeyLister
constructor
A new instance of KeyLister.
- #list_keys ⇒ Object
Constructor Details
#initialize(locale, locale_dir_path) ⇒ KeyLister
Returns a new instance of KeyLister.
10 11 12 13 14 |
# File 'lib/i18n/coverage/key_lister.rb', line 10 def initialize(locale, locale_dir_path) @locale = locale @source = YAML.load(File.open(File.("#{locale_dir_path}/#{locale}.yml"))) @keys = Set[] end |
Class Method Details
Instance Method Details
#list_keys ⇒ Object
16 17 18 19 |
# File 'lib/i18n/coverage/key_lister.rb', line 16 def list_keys visit_childs(path: []) @keys end |