Class: ChupaText::SAXParser
- Inherits:
-
Object
- Object
- ChupaText::SAXParser
- Defined in:
- lib/chupa-text/sax-parser.rb
Defined Under Namespace
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.
43 44 45 46 |
# File 'lib/chupa-text/sax-parser.rb', line 43 def initialize(input, listener) @input = input @listener = listener end |
Class Method Details
.backend ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/chupa-text/sax-parser.rb', line 29 def backend case ENV["CHUPA_TEXT_SAX_PARSER_BACKEND"] when "rexml" :rexml else if Object.const_defined?(:Nokogiri) :nokogiri else :rexml end end end |