Class: ChupaText::SAXParser
- Inherits:
-
Object
- Object
- ChupaText::SAXParser
- Defined in:
- lib/chupa-text/sax-parser.rb
Defined Under Namespace
Classes: Document, Listener, ParseError
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input, listener) ⇒ SAXParser
constructor
A new instance of SAXParser.
-
#parse ⇒ Object
Constructor Details
#initialize(input, listener) ⇒ SAXParser
Returns a new instance of SAXParser.
47 48 49 50 |
# File 'lib/chupa-text/sax-parser.rb', line 47 def initialize(input, listener) @input = input @listener = listener end |
Class Method Details
.backend ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/chupa-text/sax-parser.rb', line 33 def backend case ENV["CHUPA_TEXT_SAX_PARSER_BACKEND"] when "rexml" :rexml else if Object.const_defined?(:Nokogiri) :nokogiri else :rexml end end end |