class Splunk::PuppetResultsReader
Version of ResultsReader
that accepts an external parsing state.
ResultsReader
sets up its own Fiber for doing SAX parsing of the XML, but for the MultiResultsReader
, we want to share a single fiber among all the results readers that we create. PuppetResultsReader
takes the fiber, is_preview, and fields information from its constructor and then exposes the same methods as ResultsReader
.
You should never create an instance of PuppetResultsReader
by hand. It will be passed back from iterating over a MultiResultsReader
.
Public Class Methods
new(fiber, is_preview, fields)
click to toggle source
# File lib/splunk-sdk-ruby/resultsreader.rb, line 531 def initialize(fiber, is_preview, fields) @valid = true @iteration_fiber = fiber @is_preview = is_preview @fields = fields end
Public Instance Methods
each()
click to toggle source
Calls superclass method
Splunk::ResultsReader#each
# File lib/splunk-sdk-ruby/resultsreader.rb, line 538 def each() if !@valid raise StandardError.new("Cannot iterate on ResultsReaders out of order.") else super() end end
invalidate()
click to toggle source
# File lib/splunk-sdk-ruby/resultsreader.rb, line 546 def invalidate() @valid = false end