Class: Haml::I18n::Extractor::TextFinder
- Inherits:
-
Object
- Object
- Haml::I18n::Extractor::TextFinder
- Includes:
- Helpers::StringHelpers
- Defined in:
- lib/haml-i18n-extractor/extraction/finder/text_finder.rb
Defined Under Namespace
Classes: FinderResult
Constant Summary
Constants included from Helpers::StringHelpers
Helpers::StringHelpers::LIMIT_KEY_NAME, Helpers::StringHelpers::NOT_ALLOWED_IN_KEYNAME
Instance Method Summary collapse
-
#initialize(orig_line, line_metadata) ⇒ TextFinder
constructor
if any of the private handler methods return nil the extractor just outputs orig_line and keeps on going.
- #process_by_regex ⇒ Object
Methods included from Helpers::StringHelpers
#change_one_interpolation, #html_comment?, #interpolated?, #link_to?, #normalize_interpolation, #normalized_name
Constructor Details
#initialize(orig_line, line_metadata) ⇒ TextFinder
if any of the private handler methods return nil the extractor just outputs orig_line and keeps on going. if there’s an empty string that should do the trick to ( ExceptionFinder can return no match that way )
12 13 14 15 |
# File 'lib/haml-i18n-extractor/extraction/finder/text_finder.rb', line 12 def initialize(orig_line,) @orig_line = orig_line @metadata = end |
Instance Method Details
#process_by_regex ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/haml-i18n-extractor/extraction/finder/text_finder.rb', line 17 def process_by_regex # [ line_type, text_found ] #output_debug if Haml::I18n::Extractor.debug? result = @metadata && send("#{@metadata[:type]}", @metadata) result = FinderResult.new(nil,nil) if result.nil? result end |