Class: HTML2AsciiMath::HTMLTextParser

Inherits:
UnicodeScanner
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/html2asciimath/html_text_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str, converter) ⇒ HTMLTextParser

Returns a new instance of HTMLTextParser.



16
17
18
19
# File 'lib/html2asciimath/html_text_parser.rb', line 16

def initialize(str, converter)
  super(str)
  @converter = converter
end

Instance Attribute Details

#converterObject (readonly)

Returns the value of attribute converter.



12
13
14
# File 'lib/html2asciimath/html_text_parser.rb', line 12

def converter
  @converter
end

Instance Method Details

#parseObject

rubocop:disable Metrics/CyclomaticComplexity



21
22
23
24
25
# File 'lib/html2asciimath/html_text_parser.rb', line 21

def parse # rubocop:disable Metrics/CyclomaticComplexity
  repeat_until_error_or_eos do
    skip_ws or scan_number or scan_text or scan_symbol or scan_error
  end
end