Class: I18n::Tasks::Scanners::RubyAstScanner
- Inherits:
-
FileScanner
- Object
- Scanner
- FileScanner
- I18n::Tasks::Scanners::RubyAstScanner
- Includes:
- AST::Sexp, RelativeKeys
- Defined in:
- lib/i18n/tasks/scanners/ruby_ast_scanner.rb
Overview
Scan for I18n.translate calls using whitequark/parser
Direct Known Subclasses
Constant Summary collapse
- MAGIC_COMMENT_PREFIX =
/\A.\s*i18n-tasks-use\s+/.freeze
Instance Attribute Summary
Attributes inherited from FileScanner
Instance Method Summary collapse
-
#initialize(**args) ⇒ RubyAstScanner
constructor
A new instance of RubyAstScanner.
Methods included from RelativeKeys
Methods inherited from FileScanner
Methods inherited from Scanner
Constructor Details
#initialize(**args) ⇒ RubyAstScanner
Returns a new instance of RubyAstScanner.
19 20 21 22 23 24 |
# File 'lib/i18n/tasks/scanners/ruby_ast_scanner.rb', line 19 def initialize(**args) super(**args) @parser = ::Parser::CurrentRuby.new @magic_comment_parser = ::Parser::CurrentRuby.new @matchers = setup_matchers end |