Class: HTML2AsciiMath::HTMLTextParser
- Inherits:
-
UnicodeScanner
- Object
- UnicodeScanner
- HTML2AsciiMath::HTMLTextParser
- Extended by:
- Forwardable
- Defined in:
- lib/html2asciimath/html_text_parser.rb
Instance Attribute Summary collapse
-
#converter ⇒ Object
readonly
Returns the value of attribute converter.
Instance Method Summary collapse
-
#initialize(str, converter) ⇒ HTMLTextParser
constructor
A new instance of HTMLTextParser.
-
#parse ⇒ Object
rubocop:disable Metrics/CyclomaticComplexity.
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
#converter ⇒ Object (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
#parse ⇒ Object
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 |