Class: Evergreen::IDL::IDLSaxParser
- Inherits:
-
Object
- Object
- Evergreen::IDL::IDLSaxParser
- Defined in:
- lib/evergreen/idl.rb
Overview
A wrapper around the SAX parser
Instance Method Summary collapse
-
#initialize(file) ⇒ IDLSaxParser
constructor
A new instance of IDLSaxParser.
- #parse ⇒ Object
Constructor Details
#initialize(file) ⇒ IDLSaxParser
Returns a new instance of IDLSaxParser.
35 36 37 38 |
# File 'lib/evergreen/idl.rb', line 35 def initialize(file) @parser = REXML::Parsers::SAX2Parser.new(file) @handler = IDLSaxHandler.new end |
Instance Method Details
#parse ⇒ Object
40 41 42 43 44 |
# File 'lib/evergreen/idl.rb', line 40 def parse @parser.listen(@handler) @parser.parse @handler.idl_fields end |