Class: EPUB::Parser::XMLDocument
- Inherits:
-
Object
- Object
- EPUB::Parser::XMLDocument
- Defined in:
- lib/epub/parser/xml_document.rb,
lib/epub/parser/xml_document/refinements/oga.rb,
lib/epub/parser/xml_document/refinements/rexml.rb,
lib/epub/parser/xml_document/refinements/nokogiri.rb
Defined Under Namespace
Modules: Refinements
Class Attribute Summary collapse
-
.backend ⇒ Object
Returns the value of attribute backend.
Class Method Summary collapse
Class Attribute Details
.backend ⇒ Object
Returns the value of attribute backend.
5 6 7 |
# File 'lib/epub/parser/xml_document.rb', line 5 def backend @backend end |
Class Method Details
.new(xml) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/epub/parser/xml_document.rb', line 7 def new(xml) case backend when :Oga Oga.parse_xml(xml) when :Nokogiri Nokogiri.XML(xml) else REXML::Document.new(xml) end end |