Class: SaxStream::Internal::CombinedHandler
- Inherits:
-
Object
- Object
- SaxStream::Internal::CombinedHandler
- Defined in:
- lib/sax_stream/internal/combined_handler.rb
Instance Method Summary collapse
-
#initialize(stack, mapper_handlers) ⇒ CombinedHandler
constructor
A new instance of CombinedHandler.
- #start_element(name, *other_params) ⇒ Object
Constructor Details
#initialize(stack, mapper_handlers) ⇒ CombinedHandler
Returns a new instance of CombinedHandler.
6 7 8 9 |
# File 'lib/sax_stream/internal/combined_handler.rb', line 6 def initialize(stack, mapper_handlers) @stack = stack @handlers = mapper_handlers end |
Instance Method Details
#start_element(name, *other_params) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/sax_stream/internal/combined_handler.rb', line 11 def start_element(name, *other_params) handler = handle_for_element_name(name) raise UnexpectedNode, "Could not find a handler for the element start: #{name.inspect}" unless handler @stack.push(handler) handler.start_element(name, *other_params) end |