Class: Arclight::Traject::NokogiriNamespacelessReader
- Inherits:
-
Traject::NokogiriReader
- Object
- Traject::NokogiriReader
- Arclight::Traject::NokogiriNamespacelessReader
- Defined in:
- lib/arclight/traject/nokogiri_namespaceless_reader.rb
Overview
Provides a Traject Reader for XML Documents which removes the namespaces
Instance Method Summary collapse
-
#each(*args) ⇒ Object
Overrides the #each method (which is used for iterating through each Document).
Instance Method Details
#each(*args) ⇒ Object
Overrides the #each method (which is used for iterating through each Document)
11 12 13 14 15 16 17 18 19 |
# File 'lib/arclight/traject/nokogiri_namespaceless_reader.rb', line 11 def each(*args) return to_enum(:each, *args) unless block_given? super do |doc| new_doc = doc.dup new_doc.remove_namespaces! yield new_doc end end |