Class: I18nChecker::RakeTask::ReferenceCheck
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- I18nChecker::RakeTask::ReferenceCheck
- Defined in:
- lib/i18n_checker/rake_task/reference_check.rb
Instance Attribute Summary collapse
-
#locale_file_paths ⇒ Object
Returns the value of attribute locale_file_paths.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#name ⇒ Object
Returns the value of attribute name.
-
#reporter ⇒ Object
Returns the value of attribute reporter.
-
#source_paths ⇒ Object
Returns the value of attribute source_paths.
Instance Method Summary collapse
-
#initialize(name = :locale_reference_check) {|_self| ... } ⇒ ReferenceCheck
constructor
A new instance of ReferenceCheck.
Constructor Details
#initialize(name = :locale_reference_check) {|_self| ... } ⇒ ReferenceCheck
Returns a new instance of ReferenceCheck.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/i18n_checker/rake_task/reference_check.rb', line 18 def initialize(name = :locale_reference_check) @name = name @source_paths = FileList['app/views/*', 'app/controllers/*', 'app/jobs/*', 'app/models/*', 'app/helpers/*'] @locale_file_paths = FileList['config/locales/*'] @logger = Logger.new(STDOUT) @logger.formatter = proc { |_severity, _datetime, _progname, | "#{}\n" } @reporter = I18nChecker::NotFound::Reporter::Default.new(logger: logger) yield self if block_given? define end |
Instance Attribute Details
#locale_file_paths ⇒ Object
Returns the value of attribute locale_file_paths.
15 16 17 |
# File 'lib/i18n_checker/rake_task/reference_check.rb', line 15 def locale_file_paths @locale_file_paths end |
#logger ⇒ Object
Returns the value of attribute logger.
16 17 18 |
# File 'lib/i18n_checker/rake_task/reference_check.rb', line 16 def logger @logger end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/i18n_checker/rake_task/reference_check.rb', line 12 def name @name end |
#reporter ⇒ Object
Returns the value of attribute reporter.
13 14 15 |
# File 'lib/i18n_checker/rake_task/reference_check.rb', line 13 def reporter @reporter end |
#source_paths ⇒ Object
Returns the value of attribute source_paths.
14 15 16 |
# File 'lib/i18n_checker/rake_task/reference_check.rb', line 14 def source_paths @source_paths end |