Method: SaxStream::Parser#initialize
- Defined in:
- lib/sax_stream/parser.rb
#initialize(collector, mappers) ⇒ Parser
Returns a new instance of Parser.
7 8 9 10 11 |
# File 'lib/sax_stream/parser.rb', line 7 def initialize(collector, mappers) raise ArgumentError, "You must supply your parser with a collector" unless collector raise ArgumentError, "You must supply your parser with at least one mapper class" if mappers.empty? @sax_handler = Internal::SaxHandler.new(collector, mappers) end |