Class: I18n::Tasks::Scanners::ErbAstScanner
- Inherits:
-
RubyScanner
- Object
- Scanner
- FileScanner
- RubyScanner
- I18n::Tasks::Scanners::ErbAstScanner
- Includes:
- OccurrenceFromPosition
- Defined in:
- lib/i18n/tasks/scanners/erb_ast_scanner.rb
Overview
Scan for I18n.translate calls in ERB-file using regexp and Parser/Prism
Constant Summary collapse
- DEFAULT_REGEXP =
/<%(={1,2}|-|\#-?|%)?(.*?)([-=])?%>/m
Constants inherited from RubyScanner
RubyScanner::MAGIC_COMMENT_PREFIX, RubyScanner::MAGIC_COMMENT_SKIP_PRISM
Constants included from Logging
Logging::MUTEX, Logging::PROGRAM_NAME
Instance Attribute Summary
Attributes inherited from FileScanner
Instance Method Summary collapse
-
#ast_parser_parse_file(path) ⇒ Object
Parser scanner, method called in RubyScanner.
Methods included from OccurrenceFromPosition
Methods included from Logging
log_error, log_stderr, log_verbose, log_warn, program_name, warn_deprecated
Methods included from RelativeKeys
Methods inherited from FileScanner
Methods inherited from Scanner
Constructor Details
This class inherits a constructor from I18n::Tasks::Scanners::FileScanner
Instance Method Details
#ast_parser_parse_file(path) ⇒ Object
Parser scanner, method called in RubyScanner
16 17 18 19 |
# File 'lib/i18n/tasks/scanners/erb_ast_scanner.rb', line 16 def ast_parser_parse_file(path) @ruby_parser ||= LocalRubyParser.new(ignore_blocks: true) super end |