Class: I18n::Tasks::Scanners::ErbAstScanner

Inherits:
RubyAstScanner show all
Defined in:
lib/i18n/tasks/scanners/erb_ast_scanner.rb

Overview

Scan for I18n.translate calls in ERB-file better-html and ASTs

Constant Summary collapse

DEFAULT_REGEXP =
/<%(={1,2}|-|\#|%)?(.*?)([-=])?%>/m.freeze

Constants inherited from RubyAstScanner

RubyAstScanner::MAGIC_COMMENT_PREFIX

Instance Attribute Summary

Attributes inherited from FileScanner

#config

Instance Method Summary collapse

Methods included from RelativeKeys

#absolute_key

Methods inherited from FileScanner

#keys

Methods inherited from Scanner

#keys

Constructor Details

#initialize(**args) ⇒ ErbAstScanner

Returns a new instance of ErbAstScanner.



11
12
13
14
# File 'lib/i18n/tasks/scanners/erb_ast_scanner.rb', line 11

def initialize(**args)
  super(**args)
  @ruby_parser = LocalRubyParser.new(ignore_blocks: true)
end