Class: I18n::Tasks::Scanners::PatternMapper
- Inherits:
-
FileScanner
- Object
- Scanner
- FileScanner
- I18n::Tasks::Scanners::PatternMapper
- Includes:
- OccurrenceFromPosition, RelativeKeys, RubyKeyLiterals
- Defined in:
- lib/i18n/tasks/scanners/pattern_mapper.rb
Overview
Maps the provided patterns to keys.
Constant Summary
Constants included from RubyKeyLiterals
RubyKeyLiterals::LITERAL_RE, RubyKeyLiterals::VALID_KEY_CHARS, RubyKeyLiterals::VALID_KEY_RE
Instance Attribute Summary
Attributes inherited from FileScanner
Instance Method Summary collapse
-
#initialize(config:, **args) ⇒ PatternMapper
constructor
A new instance of PatternMapper.
Methods included from RubyKeyLiterals
#literal_re, #strip_literal, #valid_key?
Methods included from OccurrenceFromPosition
Methods included from RelativeKeys
Methods inherited from FileScanner
Methods inherited from Scanner
Constructor Details
#initialize(config:, **args) ⇒ PatternMapper
Returns a new instance of PatternMapper.
24 25 26 27 |
# File 'lib/i18n/tasks/scanners/pattern_mapper.rb', line 24 def initialize(config:, **args) super @patterns = configure_patterns(config[:patterns] || []) end |