class I18nChecker::Command::UnusedCheck
Public Class Methods
new(locale_file_paths: [], source_paths: [], reporter:)
click to toggle source
# File lib/i18n_checker/command/unused_check.rb, line 6 def initialize(locale_file_paths: [], source_paths: [], reporter:) @reporter = reporter @locale_texts = I18nChecker::Locale.texts_of(source_paths) @locale_files = I18nChecker::Locale.load_of(locale_file_paths) @unused_detector = I18nChecker::Unused::Detector.new(@locale_files) end
Public Instance Methods
run() { |unused_result| ... }
click to toggle source
# File lib/i18n_checker/command/unused_check.rb, line 13 def run unused_result = @locale_texts.detect(@unused_detector) @reporter.report unused_result yield unused_result if block_given? end