Class: HTML2AsciiMath::HTMLParser

Inherits:
Nokogiri::HTML::SAX::Parser
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/html2asciimath/html_parser.rb

Defined Under Namespace

Classes: SAXCallbacks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str, converter) ⇒ HTMLParser

Returns a new instance of HTMLParser.



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

def initialize(str, converter)
  super(SAXCallbacks.new(self))
  @string = str
  @converter = converter
end

Instance Attribute Details

#converterObject (readonly)

Returns the value of attribute converter.



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

def converter
  @converter
end

#stringObject (readonly)

Returns the value of attribute string.



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

def string
  @string
end

Instance Method Details

#parseObject



22
23
24
# File 'lib/html2asciimath/html_parser.rb', line 22

def parse
  super(string)
end