Class: I18nChecker::NotFound::Detector

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n_checker/not_found/detector.rb

Instance Method Summary collapse

Constructor Details

#initialize(locale_files) ⇒ Detector

Returns a new instance of Detector.



4
5
6
# File 'lib/i18n_checker/not_found/detector.rb', line 4

def initialize(locale_files)
  @locale_texts = locale_files.to_h
end

Instance Method Details

#detect(locale_texts) ⇒ Object



8
9
10
11
# File 'lib/i18n_checker/not_found/detector.rb', line 8

def detect(locale_texts)
  results = locale_texts.map { |local_text| detect_not_found(local_text) }
  Result.new(results.compact.flatten)
end