Class: TrajectPlus::XmlReader
- Inherits:
-
Object
- Object
- TrajectPlus::XmlReader
- Defined in:
- lib/traject_plus/xml_reader.rb
Overview
Reads in XML records for traject
Instance Attribute Summary collapse
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #each {|xml| ... } ⇒ Object
-
#initialize(input_stream, settings) ⇒ XmlReader
constructor
A new instance of XmlReader.
Constructor Details
#initialize(input_stream, settings) ⇒ XmlReader
Returns a new instance of XmlReader.
8 9 10 11 12 |
# File 'lib/traject_plus/xml_reader.rb', line 8 def initialize(input_stream, settings) @settings = Traject::Indexer::Settings.new settings @input_stream = input_stream @xml = Nokogiri::XML(input_stream) end |
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
14 15 16 |
# File 'lib/traject_plus/xml_reader.rb', line 14 def xml @xml end |
Instance Method Details
#each {|xml| ... } ⇒ Object
16 17 18 |
# File 'lib/traject_plus/xml_reader.rb', line 16 def each yield(xml) end |