Class: EPUB::Parser::XMLDocument

Inherits:
Object
  • Object
show all
Defined in:
lib/epub/parser/xml_document.rb

Defined Under Namespace

Modules: Refinements

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.backendObject

Returns the value of attribute backend



7
8
9
# File 'lib/epub/parser/xml_document.rb', line 7

def backend
  @backend
end

Class Method Details

.new(xml) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/epub/parser/xml_document.rb', line 9

def new(xml)
  if backend == :Nokogiri
    Nokogiri.XML(xml)
  else
    REXML::Document.new(xml)
  end
end