Class: InertiaI18n::Parsers::ReactParser

Inherits:
BaseParser
  • Object
show all
Includes:
JavascriptParsing
Defined in:
lib/inertia_i18n/parsers/react_parser.rb

Instance Method Summary collapse

Methods inherited from BaseParser

#extract_keys, #initialize

Constructor Details

This class inherits a constructor from InertiaI18n::Parsers::BaseParser

Instance Method Details

#extract_keys_from_content(content) ⇒ Object

React/JSX/TSX parser



11
12
13
14
# File 'lib/inertia_i18n/parsers/react_parser.rb', line 11

def extract_keys_from_content(content)
  # The entire file is parsed as JavaScript
  extract_javascript_keys(content)
end