Class: Moxml::Entity::Restorer
- Inherits:
-
Object
- Object
- Moxml::Entity::Restorer
- Defined in:
- lib/moxml/entity/restorer.rb
Overview
Restores configured character entities into explicit Moxml::Entity::Reference nodes after a native tree has been parsed and wrapped — for adapters whose parser resolves entities during parsing (libxml, and the restore_entities option on rexml/oga).
Instance Method Summary collapse
-
#initialize(doc) ⇒ Restorer
constructor
A new instance of Restorer.
- #run ⇒ Object
Constructor Details
#initialize(doc) ⇒ Restorer
Returns a new instance of Restorer.
11 12 13 14 15 16 17 |
# File 'lib/moxml/entity/restorer.rb', line 11 def initialize(doc) @doc = doc @ctx = doc.context @registry = @ctx.entity_registry @config = @ctx.config @adapter = @ctx.config.adapter end |